Is tranif0/tranif1 support on the roadmap? #1121
-
I'm working on a Verilog export functionality for a CMOS stick diagram tool, and the unidirectional nmos/pmos primitives won't do the job well. I want it to be compatible with iverilog because it's free and cross-platform, and I would prefer directing users to tools like this rather than some massive monolith like ModelSim. If supporting tranif0/tranif1 is on the roadmap, I might be able to throw a few hours at it someday. I would just need to get caught up on why it's been difficult to implement up until this point so I can go in prepared. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Support for tranif devices was added in 2008, and there are tests in the test suite that use them. What do you think is missing? |
Beta Was this translation helpful? Give feedback.
The README is very much in need of updating.
Regarding your OR function. The LRM does not define the behaviour of a tranif when the control input is undefined (x or z), so vvp chooses to follow the rules for MOS switches. The tranif is bidirectional, so if w1 or w2 ever gets assigned a L or H value, that can feed back onto the vdd and vss signals. You should be able to fix this by changing vdd and vss to have supply strength, but there does seem to be a bug in vvp that prevents y being updated at the right time.
Two other simulators I tried gave the same results as vvp for your original code, and gave the desired result once vdd and vss were changed to supplies.