Chris Jones
12/05/2020, 1:52 PMChris Jones
12/06/2020, 1:38 PMStefan Schippers
12/06/2020, 3:56 PMChris Jones
12/06/2020, 11:11 PMStefan Schippers
12/07/2020, 10:06 PMChris Jones
12/07/2020, 11:07 PMStefan Schippers
12/08/2020, 12:29 AMXM8 D G S B sky130_fd_pr__nfet_01v8_lvt W=1 L=0.15 nf=1
+ ad={int((nf+1)/2) * W / nf * 0.29}
+ pd={2*int((nf+1)/2) * (W / nf + 0.29)}
+ as={int((nf+2)/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
This is the error:
Original line no.: 20, new internal line no.: 14623:
Formula() error.
l=0.15;w=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;nf=1;m=1;
Original line no.: 0, new internal line no.: 15120:
Undefined number [ad]
Original line no.: 0, new internal line no.: 15120:
Cannot compute substitute
...
Any suggestions? may be you see something wrong immediately....Chris Jones
12/08/2020, 12:38 AMTom
12/18/2020, 6:16 PMStefan Schippers
12/18/2020, 9:28 PM.subckt sky130_fd_pr__nfet_01v8_lvt d g s b
+
.param l = 1 w = 1 ad = 0 as = 0 pd = 0 ps = 0 nrd = 0 nrs = 0 sa = 0 sb = 0 sd = 0 mult = 1 nf = 1.0
msky130_fd_pr__nfet_01v8_lvt d g s b sky130_fd_pr__nfet_01v8_lvt__model l = {l} w = {w} ad = {ad} as = {as} pd = {pd} ps = {ps} nrd = {nrd} nrs = {nrs} sa = {sa} sb = {sb} sd = {sd} nf = {nf}
Patched:
.subckt sky130_fd_pr__nfet_01v8_lvt d g s b
+
.param l = 1 w = 1 nf = 1.0 ad = 0 as = 0 pd = 0 ps = 0 nrd = 0 nrs = 0 sa = 0 sb = 0 sd = 0 mult = 1
msky130_fd_pr__nfet_01v8_lvt d g s b sky130_fd_pr__nfet_01v8_lvt__model l = {l} w = {w} nf = {nf} ad = {ad} as = {as} pd = {pd} ps = {ps} nrd = {nrd} nrs = {nrs} sa = {sa} sb = {sb} sd = {sd}
Tom
12/18/2020, 11:48 PMStefan Schippers
12/19/2020, 12:07 AMTom
12/19/2020, 12:34 AMStefan Schippers
12/19/2020, 2:45 AMTom
12/19/2020, 3:30 AMTom
12/19/2020, 6:20 PMStefan Schippers
12/19/2020, 6:42 PMTim Edwards
12/19/2020, 9:22 PMStefan Schippers
12/20/2020, 1:45 AM.subckt sky130_fd_pr__res_generic_po r0 r1
+
.param w = 1 l = 0 mult = 1 r = 0 tc1 = {tc1rsgpu*sky130_fd_pr__res_generic_po__tc1_slope} tc2 = {tc2rsgpu*sky130_fd_pr__res_generic_po__tc2_slope}
+ rp1_mm = {rp1*sky130_fd_pr__res_generic_po__slope/sqrt(2.0*l*w*mult+rp1/100000.0)}
+ r_tot = {(rp1+rp1_mm)*l/(w-1e6*(-tol_poly-poly_dw))+r}
sky130_fd_pr__res_generic_po r0 r1 sky130_fd_pr__res_generic_po__monte r = {r_tot} tc1r = {tc1} tc2r = {tc2}
.model sky130_fd_pr__res_generic_po__monte r tref = 30.0
.ends sky130_fd_pr__res_generic_po
the resistor line starts with sky130_fd_pr__res_generic_po, i changed to rsky130_fd_pr__res_generic_po (resistor names must start with 'r') and also changed the tc1r and tc2r to tc1 and tc2 respectively. I am not 100% sure this is correct, however this way ngspice handles the resistor. the R vs temp for a 1/1 resistor is shown here. @Tim Edwards do you think it makes sense? I have bundled this change in the patch file that does the 'nf' param reordering.Tim Edwards
12/20/2020, 1:53 AMsky130_fd_pr__model__r+c.model.spice
in the sky130_fd_pr
library has the model sky130_fd_pr__res_generic_po
. . . but it is commented out. I don't know why it was commented out, or if the model is correct, or if the model is the same as sky130_fd_pr__res_generic_po__monte
. When I am able to make a pull request to the repository, this is one of the fixes I want to make (assuming the model is good).Stefan Schippers
12/20/2020, 1:56 AMTim Edwards
12/20/2020, 2:03 AM