Hey, Ive got a problem with the npn transistors in...
# sky130
e
Hey, Ive got a problem with the npn transistors in the sky130 pdk... I am trying to build a Bicmos logic inverter... But I always run into a problem with the npn Transistors (the pnp just work fine...)
s
I have the same problem, so i guess there is an issue in the npn spice models. Will try to look at it. I haven't tested npn, and I don't know if its use is allowed in circuitry. (Cc @Tim Edwards)
t
It's a proper characterized device. There is some issue with the way the model names got handled in the PDK. It is a matter of having the right model/subcircuit name and the right include files, but I have not sorted out what needs to be fixed in the PDK to make it work without manual intervention.
s
@Tim Edwards the problem is that
sky130.lib.spice
includes (for example in the tt corner)
corners/tt.spice
, which in turn includes
../all.spice
which includes the npn transistors:
.include "../../libs.ref/sky130_fd_pr/spice/sky130_fd_pr__npn_05v5_W1p00L1p00.model.spice"
.include "../../libs.ref/sky130_fd_pr/spice/sky130_fd_pr__npn_05v5_W1p00L2p00.model.spice"
However these models are "cornerized", there is a
s
,
f
,
t
corner, so my suggestion is to include
sky130_fd_pr__npn_05v5__t.corner.spice
directly from corners/tt.spice and remove npn inclusion from
all.spice
. Same thing for the s and f corners. The
sky130_fd_pr__npn_05v5__t.corner.spice
defines some needed parameters before including the npn model:
Copy code
.param
+ dkisnpn1x1=8.7913e-01 dkbfnpn1x1=9.8501e-01
+ dkisnpn1x2=9.0950e-01 dkbfnpn1x2=9.6759e-01
+ dkisnpnpolyhv=1.0 dkbfnpnpolyhv=1.0
.include "sky130_fd_pr__npn_05v5_W1p00L1p00.model.spice"
.include "sky130_fd_pr__npn_05v5_W1p00L2p00.model.spice"
.include "sky130_fd_pr__npn_11v0_W1p00L1p00.model.spice"
Not sure what is the best way to relate NPN
t, s, f
corners to cmos
tt, sf, fs, ff, ss
corners, may be there is no clear correlation of cmos corners vs bipolar corners...
@Enno I was able to simulate the sky130_fd_pr__npn_05v5_w1p00l2p00 npn transistor by adding these parameter definitions in the netlist (for NPN
t
corner):
Copy code
.param 
+ dkisnpn1x1=8.7913e-01 dkbfnpn1x1=9.8501e-01 
+ dkisnpn1x2=9.0950e-01 dkbfnpn1x2=9.6759e-01
+ dkisnpnpolyhv=1.0 dkbfnpnpolyhv=1.0
e
Nice! Thanks!