<@U01819B63HP> I have troubles with `device_param_...
# xschem
h
@Stefan Schippers I have troubles with
device_param_probe.sym
, I struggle to get it working. Any hints? I just realized that the
nfet/pfet_*_nf
are missing the
id
and
gm
expressions, could you please add them there as well? And they sometime work and sometime now, do you have an idea what could go wring? Is the
save all
sufficient?
I did a bit of debugging, and here a few things: • Before the
write XYZ.raw
a
remzerovec
is helpful to fix issues with non-zero vectors. • The
gm
values need an extra
save @m...[gm]
statement. @Stefan Schippers Any chance that you could put these
save [gm]
statements automatically into the simulation controls? For many transistors, this is quite difficult. Or is there a way like the
save all
but for device parameters?
s
@Harald Pretl the options I use to save most variables are
.options savecurrents
and `save all`:
Copy code
.options savecurrents
...
...
.control
  ...
  save all
  tran 1n 200n
  remzerovec
  write dile.raw
.endc
these two save options will dump all currents (including device internal currents) to the raw file. for other parameters, like gm, vth and others, these must be specifically saved with a save instruction for every transistor, and as far as i know wildards are not accepted:
Copy code
save @m.x1.xm5.msky130_fd_pr__nfet_01v8[gm]
save @m.x1.xm5.msky130_fd_pr__nfet_01v8[gds]
save @m.x1.xm5.msky130_fd_pr__nfet_01v8[gmbs]
save @m.x1.xm5.msky130_fd_pr__nfet_01v8[vth]
The syntax for saving device parameters is really ngspice specific. Xyce will use a totally different (and cleaneer) syntax, I am not even sure if every internal parameter is available. For the
remzerovec
i also struggled a lot with this. It happens I believe when body currents are zero (low injection) and then no vector is saved. I hope the ngspice devs will fix this autmatically in the future... Will add the gm/id printouts in the _nf fets. For the view_only_probes dimming the circuit is a good idea, will work on that, will take a bit of time. Thanks (edited)
@Harald Pretl using
.options savecurrents
and looking into the header of the raw file you find the syntax of all fet currents:
i(@m.x2.xm2.msky130_fd_pr__nfet_01v8_lvt[id])
Getting other parameters, for example
gm
is easy:
@m.x2.xm2.msky130_fd_pr__nfet_01v8_lvt[gm]
so remove the
i(
...
)
, change
[id]
with
[gm]
, and give the resulting expression to a
save
statement. For parameters that are voltages (like vth) replace i(...) with v(...)
h
@Stefan Schippers That’s a good tip, thank!
s
@Harald Pretl I have done the change, if only probes are enabled the schematic is dimmed instead of hidden:
h
@Stefan Schippers that looks amazing, thanks!