Looks like there's no ngspice channel, so hopefull...
# analog-design
v
Looks like there's no ngspice channel, so hopefully, this channel will work. Anyone know if ngspice can handle alterparam calls on subcircuits that are below the top level of hierarchy? I've been trying to edit transistors (all in subcircuit models) with alterparam like so:
Copy code
alterparam XDUT.XMNDIO w=5.5
...
reset
but I keep getting the following message:
Copy code
Error: parameter 'w' not found,
   command 'alterparam' skipped
That message suggests to me that ngspice was able to follow my path to the transistor subcircuit instance, but for whatever reason, it can't find the transistor's "w" parameter from there. Now, I checked to be sure and, yes, the FET subcircuit models do call the width parameter "w". Every parameter has the expected name, except, perhaps, for "M" being replaced with "mult". I mention the lower level of hierarchy because I found some threads from 2018 on ngspice's Sourceforge page about alterparam that seemed to suggest that, at least at the time, ngspice could not do
alterparam
on subcircuits below the top level. Anyone know if that is still true?
t
Should be
altparam @XDUT.XMNDIO[w]=5.5
, I think, or something like that.
alterparam
apparently operates on all parameters of all subcircuits, because
alterparam sky130_fd_pr__pfet_g5v0d10v5 w = 2
works, ignoring that it is a pretty useless command. What you want is
alter
, e.g.:
alter m.xc1.msky130_fd_pr__pfet_g5v0d10v5 w = 2
. However, I am having difficulty getting that to work with either
w
or `l`; ngspice keeps telling me
Error: no model available for w= 2.0 l = 0.8
which indicates that it thinks there is no valid bin for that width and length, except that there is.
v
Well, if it applies the change to every device, it won't do what I was wanting it to do at all. Guess I could experiment with the other
alter*
commands. That would probably mean having to descend all the way down to the MOSFET instance inside the XM* subcircuit. I was really hoping to avoid having to dig down all the way to the MOSFET instance inside the subcircuit, what with the crazy long name it has and whatnot. Also, I seem to recall seeing there's more than one MOSFET instance inside the RF transistors. Probably be less trouble to just edit the DUT's schematic...