From: Stephen W. <st...@ic...> - 2009-10-13 15:44:07
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Martin Whitaker wrote: > Stephen Williams wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> >> I've been working on some fixes to the tranifX handling in Icarus >> Verilog. I fixed a couple bugs, but now the tranif1.v test in the >> ivtest suite no longer works. I've been puzzling over it, and I now >> think that the test itself is not valid. The meat of the program >> is here: >> >> wire pin; >> pullup (weak1) (keep1); >> pulldown (weak0) (keep0); >> tranif1 (pin, keep1, pin); >> tranif0 (pin, keep0, pin); [...] > What you are missing is that tranifs are true (bi-directional) switches. Once > you turn one of them on, the keeper can drive "pin" through the switch, so > will hold "pin" at its last value until something stronger drives "pin" to > another value. I am *not* missing that tranifs are true bi-directional switches. Believe me, I've gone through a lot of pain to make them work, so I'm well aware. 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? You see, the test is relying on a delta delay between an assignment of Z to the pin and the tranif enable gates responding. If you were to solve the value of the island of switches based only on the drivers, you should see this: tranif1 (pin=Z, week1, pin=Z); tranif0 (pin=Z, week0, pin=Z); Tell me what that is without invoking delta delays or state machines or hysteresis. Now the following I think is well defined. wire pin; wire keeper; assign #(delta) keeper = pin; pullup (week1) peek1; pulldown (week0) peek0; tranif1 (pin, keep1, keeper); tranif0 (pin, keep0, keeper); That at least 2 of the big3 get the do-what-I-mean answer to the original example is freaking me out. Modelsim? - -- 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 iD8DBQFK1KA+rPt1Sc2b3ikRAi9/AKCKe1+YrpPSABjooUH/tZOGg4YiDwCgzHOg A4xY5HgJNsB0HKPQRg/RI+o= =1DlH -----END PGP SIGNATURE----- |