Krzysztof Herman
01/14/2025, 7:02 AMgm
parameter out of a simple netlist at a specified DC bias. The N(XM1:gm)
seems not to work.
** sch_path: /home/herman/tmp/xyce_op.sch
**.subckt xyce_op
Vin in GND pulse(0.0 1.2 0.0 100p 100p 2n 4n)
Vdd net1 GND 1.2
XM1 out in GND GND sg13_lv_nmos w=1.0u l=0.45u ng=1
XM2 out in net1 net1 sg13_lv_pmos w=1.0u l=0.45u ng=1
**** begin user architecture code
.preprocess replaceground true
.option temp=27
.op
.print tran format=raw file=tran_logic_not.raw
.lib /home/herman/github/KrzysztofHerman/IHP-Open-PDK/ihp-sg13g2/libs.tech/xyce/models/cornerMOSlv.lib mos_tt
**** end user architecture code
**.ends
.GLOBAL GND
.end
Krzysztof Herman
01/14/2025, 7:07 AM-plugin
in the command line.Tim Edwards
01/16/2025, 3:49 AMgm
. However, I did find one hint in the Xyce manuals about using the N()
function, which is that you can run Xyce with command-line argument -namesfile <file_name>
and it will output a list of valid names that can be used in an N()
function. On your netlist, I get:
0 vdd_branch
1 vin_branch
2 y:xm1:psp103_va!m1_noi
3 y:xm1:psp103_va!m1_gp
4 y:xm1:psp103_va!m1_noi_gnd_branch
5 net1
6 in
7 out
8 y:xm2:psp103_va!m1_noi
9 y:xm2:psp103_va!m1_gp
10 y:xm2:psp103_va!m1_noi_gnd_branch
And if I add to the netlist, say:
.print tran N(y:xm1:psp103_va!m1_noi)
it at least runs without giving me an error.
But although the documentation suggests that the list given by -namesfile
may be only a partial list of variables that you can print using the N()
function, I can neither get any syntax involving "gm" to work, or figure out where the variable names in the list dumped by -namesfile
exist in the PSP code. Also I have no clue why there has to be a y:
in front. But it's clear that the syntax is obscure and has to be very specific, so maybe the name dump above gives you some clue about getting the gm
value to print?Krzysztof Herman
01/16/2025, 6:16 AMTim Edwards
01/16/2025, 2:39 PM.print tran N(xm1:ypsp103_va!m1:gm)
and then I had to figure out that Xyce produced an output file with the name of the input file suffixed with .prn
. But the value of gm
is there. There are still things I don't understand and which aren't explained (that I can find) in the Xyce documentation, such as why parameter names printed by -namesfile
have a much different syntax. Why an underscore instead of a colon? Why y:xm1:psp130_va
instead of xm1:ypsp103_va
? Xyce has a lot of mysteries. (Of course, so does ngspice.)