Corrected the other problem with the PNP bipolar, which is that
the model has a substrate pin defined, although the process
requires that the collector of the PNP must be tied to the
substrate, so the device cannot have an independent substrate.
diff --git a/sky130/Makefile.in b/sky130/Makefile.in
index 617b5ca..362e601 100644
--- a/sky130/Makefile.in
+++ b/sky130/Makefile.in
@@ -730,6 +730,11 @@
patch -p1 -f -d ${STAGING_PATH}/${SKY130A} \
< custom/patches/sky130_fd_pr_2.patch \
2>&1 | tee -a ${SKY130A}_make.log || true
+ # Custom: Patch the models to remove the substrate pin from the PNP
+ # device, which has no independent substrate pin (collector=substrate)
+ patch -p4 -f -d ${STAGING_PATH}/${SKY130A}/libs.ref/${PR_SPICE} \
+ < custom/patches/sky130_fd_pr_3.patch \
+ 2>&1 | tee -a ${SKY130A}_make.log || true
# Custom: Add "spinit" file
cat ./custom/models/spinit >> \
${STAGING_PATH}/${SKY130A}/libs.tech/ngspice/spinit