I am trying automatically generate Verilog from VLSI stick diagrams for logical output validation. The problem I am running into is that in general, transistors in VLSI are symmetrical, but the Verilog switch-level primitives each have a problem.
So I need to combine the bidirectional feature of tranif0/tranif1 with the source dependency of nmos/pmos.
Does anyone have any suggestions for a workaround that accomplishes this without causing issues? It needs to be generally applicable since this is for automatic code generation. The Verilog does not need to exactly represent the topology of the diagram as long as it correctly produces its output. I'm not interested in analog effects, voltage drop, etc - this is a purely logic-level simulation.
A solution I've seen is converting MOS primitives directly connected to VSS/VDD as unidirectional nmos/pmos gates and the rest as tran
gates. There may be more nuances using unidirectional gates when directly connected to other non-mos primitives like a buf gate.