Peter Schmidt-Nielsen
05/24/2023, 10:30 PMlibraries/sky130_fd_sc_hd/latest/cells/nand2/sky130_fd_sc_hd__nand2_1.spice
):
.subckt sky130_fd_sc_hd__nand2_1 A B VGND VNB VPB VPWR Y
X0 Y A VPWR VPB sky130_fd_pr__pfet_01v8_hvt w=1e+06u l=150000u
X1 VPWR B Y VPB sky130_fd_pr__pfet_01v8_hvt w=1e+06u l=150000u
X2 VGND B a_113_47# VNB sky130_fd_pr__nfet_01v8 w=650000u l=150000u
X3 a_113_47# A Y VNB sky130_fd_pr__nfet_01v8 w=650000u l=150000u
.ends
Note that sky130_fd_pr__pfet_01v8_hvt
defines its args in the order: drain, gate, source, body. So, FET X0 makes sense as a pull-up for A=0, because its drain is the output. But FET X1 seems backwards, why is VPWR the drain, and Y the source, not the other way around? I have the same confusion with the pull-down stack of X2 and X3, although at least there symmetry is broken between the two FETs. But in the pull-up case I can't see what breaks symmetry between the A and B inputs, and why one FET would be backwards relative to the other.Tim Edwards
06/06/2023, 3:13 AM