I’m encountering a problem with the MOS models and params. I have been using the models `?fet_xxx_nf...
c

Colin Weltin-Wu

7 months ago
I’m encountering a problem with the MOS models and params. I have been using the models
?fet_xxx_nf
, i.e., what I assume are the models which calculate correct areas and perimeters for fingered FETs. I have been using them no problem with numerical values for width and length. But I tried using params as shown in the attached image, and get lots of errors in ngspice. (I know I haven’t enabled multiple fingers yet) ngspice output (there are many similar)
Undefined parameter [len_3p3]
Netlist line no. 26:
 Formula() error.
      |m=1; sd=0; sb=0; sa=0; nf=1; mult=1; l=len_3p3; w=(wid)*1 ; ad=int((1+1)/2)*(wid)*0.29; as=int((1+2)/2)*(wid)*0.29; pd=2*int((1+1)/2)*((wid)+0.29); ps=2*int((1+2)/2)*((wid)+0.29); swx_vth=sw_vth0_sky130_fd_pr__nfet_g5v0d10v5+sw_vth0_sky130_fd_pr__nfet_g5v0d10v5_mc; nrd=0.29/(wid)/1 ; nrs=0.29/(wid)/1 ; swx_nrds=89.1*nf/w+443.5;| : |l|=|len_3p3|
This is the section of the netlist that starts with the offending instance.
XM9 net10 net12 GND GND sky130_fd_pr__nfet_g5v0d10v5 L={LEN_3P3} W='{WID} * 1 ' nf=1 ad='int((1 + 1)/2) * {WID} * 0.29' as='int((1 + 2)/2) * {WID} * 0.29'
+ pd='2*int((1 + 1)/2) * ({WID} + 0.29)' ps='2*int((1 + 2)/2) * ({WID} + 0.29)' nrd='0.29 / {WID} / 1 ' nrs='0.29 / {WID} / 1 ' sa=0
+ sb=0 sd=0 mult=1 m=1
E4 net11 GND ctrl_vds GND 1
Vvds_ctrl ctrl_vds GND {VDS}
Vvgs_ctrl ctrl_vgs GND dc {VGS} ac 1
R1 net11 src_n1p8lvt 1 m=1
R2 net11 src_n1p8 1 m=1
R3 net11 src_n3p3nvt 1 m=1
R5 net11 src_ng5p0d10p5 1 m=1
R6 src_p1p8lvt net5 1 m=1
R7 src_p1p8 net5 1 m=1
R8 src_p1p8hvt net5 1 m=1
R9 src_pg5p0d10p5 net5 1 m=1
**** begin user architecture code

.param WID=0.5
.param LEN_1P8=0.15
.param LEN_PLVT=0.35
.param LEN_3P3=0.5
.param VGS=0.9
.param VDS=0.6
.options sparse
.probe alli
I think I’m using
param
correctly, because other parameters like the voltage source values have been simulating fine. Is there anything special I need to do when parameterizing device model parameters?