1 # Basic Ternary Inverter, implemented with CD4007
3 # TODO: embed with tinv.asc, netlist generated by
5 nodes
= ("Vin", "PTI_Out", "STI_Out", "NTI_Out")
7 # Dual MOSFET Complementary Pair + Binary Inverter
8 parts_generated
= ["CD4007"]
9 parts_consumed
= ["MP", "MN"]
10 parts_kept
= ["RP", "RN"]
12 # Based on pinout from http://www.cedmagic.com/tech-info/data/cd4016.pdf
15 # First MOSFET pair has sources already connected to Vdd/Vss
17 "PTI_Out": ("CD4007", 13),
18 "NTI_Out": ("CD4007", 8),
22 # Second MOSFET pair, need to connect sources
24 "PTI_Out": ("CD4007", 1),
25 "NTI_Out": ("CD4007", 5),
27 "$G_Vdd": ("CD4007", 2),
28 "$G_Vss": ("CD4007", 4),
32 # Always connected once if use once or more
35 "$G_Vdd": ("CD4007", 14),
36 "$G_Vss": ("CD4007", 7),
38 # TODO: always connect binary inverter, since we'll never be using it,
39 # but to prevent MOSFETs from switching on and off, wasting power?
40 # May need a change in this data structure to support multiple connections to $G_Vdd/Vss