[Magic-dev] Important fixes to IRSIM

R. Timothy Edwards tim.edwards at multigig.com
Fri Oct 6 22:27:00 EDT 2006


Since a lot of people who use Magic also use IRSIM, I'd like to announce
here that I have fixed one of the worst bugs in IRSIM---the tendency to
propagate indeterminate ('X') values through circuits which otherwise
(e.g., in SPICE) behave perfectly well.

I have seen this problem attributed to IRSIM's method of breaking
feedback loops.  However, I looked at a fairly typical failing circuit
closely, and decided that this is not the case at all.  The problem
occurs in circuits like delay flip-flops, where a value is held stable
by a weak feedback inverter, creating a stable back-to-back inverter
pair.  IRSIM has no knowledge of the tight positive feedback loop.
What it sees is a node being driven (in the case of a changing value)
by two nodes (the flip-flop input and the feedback inverter) at two
opposite logic values.  This can happen when the pass-gates in the
feed-forward and feedback loops are both ON simultaneously due to
small gate delays setting the various clock and !clock values.  IRSIM
determines that the resulting node value must be indeterminate, and
sets it immediately.  The state of the flip-flop then becomes
indeterminate, and quickly spreads to other nodes in the circuit.

I implemented a very simple scheme in which I introduced a value
called "settle", set by a command of the same name.  "settle" should
be set to some small value, typically smaller than a step size but
larger than a typical gate delay.  When IRSIM encounters a node
being driven by multiple conflicting values resulting in an intermediate
voltage value, it will punt on the indeterminate value for a time of
"settle" time units (ps).  If the problem of having multiple drivers
on the same node is resolved within that time, the event setting the
indeterminate result is discarded.

Naturally, this solution is a bit of a "hack" in the sense that the
"correct" solution would be to determine where positive feedback loops
occur, and treat them accordingly.  But I think this simple solution
will prove to work correctly in the vast majority of cases.

						---Tim

+--------------------------------+-------------------------------------+
| Dr. R. Timothy Edwards (Tim)   | email: tim.edwards at multigig.com     |
| MultiGiG, Inc.                 | web:   http://www.multigig.com      |
| 100 Enterprise Way, Suite A-3  | phone: (831) 621-3283               |
| Scotts Valley, CA 95066        | cell:  (240) 401-0616               |
+--------------------------------+-------------------------------------+



More information about the magic-dev mailing list