From: Stephen W. <st...@ic...> - 2009-10-13 17:18:46
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Cary R. wrote: > --- On Tue, 10/13/09, Stephen Williams <st...@ic...> wrote: > >> In fact, it's their "switch" nature that makes me think >> this test is wrong. Ask yourself: >> >> - what happens when "pin" is driven 0? >> - what happens when "pin" is driven 1? >> - what happens when "pin" is driven X? >> - what happens when "pin" is driven Z? >> and >> - Does it make sense for the answer to any of the above to >> differ depending on what happened before it? > > 0 and 1 are real signals, X is an indeterminate real signal > (it's 1 or 0, we just don't know which one), but Z is special, > it is supposed to represent a lack of drive. I don't think > of this as driving Z, but more as not driving anything. In > that context it seems to make sense that the tranif gates > work as they do. If you are no longer driving a signal the > pulls keep it in the previous state. But when "pin" becomes HiZ, your logic is relying on the switch not disconnecting until after tran resolution is done. In other words, one of the switches is remembering that it is closed while the new value is calculated. And of course then it discovers that the feedback is holding the switch closed. But if you start with the switches open (which is reasonable because someone just propagated a HiZ to "pin") then the keepers are not attached to anything and "pin" remains HiZ. Or that is what is happening in Icarus Verilog. So what should happen here (Drive pin=1, then pin=HiZ)? tranif1 (pin, keep0, pin); tranif0 (pin, keep1, pin); Or here? buf (buffered_pin, pin); tranif1 (pin, keep1, buffered_pin); tranif0 (pin, keep0, buffered_pin); Every argument claiming that the tranif1.v test is "correct" has so far relied on some hysteresis or capacitance or memory in the switch for it to work. But how can that memory be justified, or modeled. - -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep." -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFK1LZsrPt1Sc2b3ikRAqIOAJ9AGewQinI6PVX0zvTQgMboaYKl/wCgmX+X Bc/KTztWOA7aAn+M0LxyVpU= =o+Ri -----END PGP SIGNATURE----- |