I've run into a problem while characterizing the n...
# analog-design
t
I've run into a problem while characterizing the n/pfet_g5v0d10v5 models. When choosing [L=0.5, W=10, nf=10, mult=1] the simulation fails with "Fatal: Pclm = -1.72441 is not positive.", However, when I choose [L=0.5, W=10, nf=1, mult=1] (same but nf=1) it works fine. It's also worth pointing out that I don't think I'm running into min. W issues since everywhere nf is referenced in the model its multiplied by W so W is the width of each finger rather than total effective width. Anyone know what's going on here/what I'm doing wrong? I'm using xschem but it seems to be populating the params correctly.
d
Could you share your SPICE deck?
t
Absolutely, here it is.
Actually, @Stefan Schippers why are you dividing by nf to get the areas/perimeters here? ad='int((nf+1)/2) * W/nf * 0.29' + as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)' Is that correct?
If W is the finger width which it seems to be, then presumably the a/p will actually scale with nf
CORRECTION: mult is multiplied by W in the model. Nevertheless, the Magic generator treats W as the finger width so I think what I said is still correct
c
Hm, I thought W was the total width. That was the case on other processes I used long ago, but I don't know if that is more generally true.
s
@diadatp @Tom @Chris Jones W is the total width, W/nf is the single finger width. [EDIT] the equations you posted above seem correct ... The calculation in latest symbols (Replace your symbols or delete the instance attributes AD,AS,PD,PS, so it will take the symbol defaults) are:
Copy code
XM1 net1 G1v8 S B sky130_fd_pr__nfet_01v8_lvt L=0.15 W=1 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29'
+ pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)' nrd='0.29 / W' nrs='0.29 / W'
+ sa=0 sb=0 sd=0 mult=1 m=1
@Tom. i am dividing by nf but also multiplying by int(nf+1)/2) .. these complicated expression handle the case of multi-fingered transistors with even / odd number of fingers. For Even number of fingers (consider nf=4) you have 3 source contacts and 2 drain contacts, while for odd (nf=3) you have 2 and 2 respectively.
1.png
I have verified that these equations are parsed and resolved as constant numbers by ngspice before starting simulation, so this is not a runtime detractor (may be it adds a little overhead in netlist parsing).
t
@yrrapt I just tried ".option wnflag=1" as suggested but with no luck.  What does it do?
@Stefan Schippers Thanks for confirming. I have made sure my symbol is up to date, I'm using "pfet_g5v0d10v5", I'm still getting the error when choosing W=10, nf=10 which even if W is total width should leave me with a per-finger width of 1 which should be fine.