Stefan Schippers

11/10/2020, 11:16 PM
@User Resistors in spice netlists can be defined by a model, like in
R1 node1 node2 resmodel r={expr}
The resistor model may define some parameters like temperature coefficients: .
model resmodel tc1={expr} ...
. Problem is that ngspice (as@User found in his tests) does not understand this syntax. In all but one case the
in resistor models contains a single parameter, so the numeric value of the parameter has been written directly into the resistor line, without using a model:
R1 node1 node2 r={expr}  tc1=number1 tc2=number2
There is one case where the tc1={expr} does not evaluate to a fixed number but depends on more than one parameter:
tc1 = {-1.47e-3-5e-7*sky130_fd_pr__res_xhigh_po__var_mult*rsheet}
. What previous patches have done is to replace only the leading -1.47e-3 into the resistor line: tc1 = -1.47e-3. This is not correct. My suggestion is to replace line 60 in sky130_fd_pr__res_xhigh_po.model.spice:
+ tc1 = -1.47e-3
+ tc1 = {-1.47e-3-5e-7*sky130_fd_pr__res_xhigh_po__var_mult*rsheet}
I am doing a test right now if ngspice is ok with that. Will let you know asap.