Hi, I have an issue how to get a `gm` parameter ou...
# xyce
k
Hi, I have an issue how to get a
gm
parameter out of a simple netlist at a specified DC bias. The
N(XM1:gm)
seems not to work.
Copy code
** 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
It is IHP Open PDK so to reproduce one have to compile PSP model from sources. and then run the simulation indicating a valid model using
-plugin
in the command line.
t
@Krzysztof Herman: It took me a little while to recompile Xyce with shared library support and run through all of the steps to get it to run with the PSP model. Then it took some more digging into manuals to come up with anything. I still haven't figured out how to print
gm
. 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:
Copy code
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:
Copy code
.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?
k
@Tim Edwards thank you for taking care. I guess we have the same solution provided by one of the developers of xyce on our gh issues issue #328
t
@Krzysztof Herman: Okay, thanks for the issue link. Indeed, the answer is just as obscure as I thought it would be, with just the right syntax:
Copy code
.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.)