Add merging to merging tool (untested).
[trinary.git] / bb / tnor.py
blob0d75498100f26f9c49b893996c18e71f1f4c9e5f
1 # Ternary NOR, implemented with CD4007
4 nodes = ("A", "B", "TNOR_Out")
6 # Dual MOSFET Complementary Pair + Binary Inverter
7 parts_generated = ["CD4007"]
8 parts_consumed = ["MP1", "MP2", "MN1", "MN2"]
9 parts_kept = ["RP", "RN"]
11 # Based on pinout from http://www.cedmagic.com/tech-info/data/cd4016.pdf
12 pins = [
14 "A": ("CD4007", 6),
15 "B": ("CD4007", 3),
16 "TNOR_Out": "TNOR_Out",
17 "$G_Vss": [("CD4007", 4), ("CD4007", 7)],
18 "$G_Vdd": ("CD4007", 14),
21 # Internal nodes
23 # Connect these two nodes together
24 "NI": [("CD4007", 13), ("CD4007", 2)],
25 # Connects to resistors
26 "NP": ("CD4007", 1),
27 "NN": [("CD4007", 8), ("CD4007", 5)],
32 # Always connected once if use once or more
33 global_pins = {
34 # TODO: always connect binary inverter, since we'll never be using it,
35 # but to prevent MOSFETs from switching on and off, wasting power?
36 # May need a change in this data structure to support multiple connections to $G_Vdd/Vss