<@U01819B63HP> <!here> I want to print gm of the...
# xschem
a
@Stefan Schippers <!here> I want to print gm of the transistor, please is my expression correct? Is this the right place for the expression? I don't know what exactly I should do
@Arman Avetisyan
@Mitch Bailey
s
@Ahmed Ramadan (Mabrains) looks like the expression is correct. Read the ngspice messages, if it can't find the specified gm parameter it will print a warning. the .dc command is wrong. a .dc usually specifies a voltage source (typically) , a start value, an end value and a step value, like:
.dc Vin 0 1.8 0.01
a
Is this the right place to put the expression?
This ia the ngspice messages
I have edited the .dc command
And I get this ngspice messages
s
ok, now at the ngspic prompt do a
display
command and see if the [gm] parameter you specified is saved.
👍 1
a
I entered "display" and got this
s
According to the other parameters related to m1 the correct path is without the .x1:
@m.xm1.msky130_fd_pr__nfet_01v8[gm]
a
I edited it
IMG_٢٠٢٢٠٨١٠_٢٢٤٩٣٠.jpg
And got almost the same messages
s
there is a typo in the [gm] .save: after
..fd_pr
put a double underscore,
__
.
a
IMG_٢٠٢٢٠٨١٠_٢٢٥٢١٧.jpg
s
Yes, you got the transistor [gm] saved, 181 dc points, that is from 0 to 1.8V at 0.01V increments
a
Sorry I did not get it
I need the value of gm
s
you can plot the [gm] variable in a waveform viewer
you can do a
print "@m.xm1.msky130_fd_pr__nfet01v8[gm]"
at the ngspice prompt to see the values
💯 1
a
Is there a command for that? My waves viewer does not contaim anythig
Thanks alot! @Stefan Schippers
Very helpful!
👍 1
Is there a way to print just one value for one Vin value?
s
In this case do the following. 1. set the
Vin
voltage source to the desired voltage value 2. remove the .dc and insert just a
.op
(no parameters) ngspice will only calculate one operating point and the print instruction will print one value.
❤️ 1
a
Thanks alot for your patience and the ever help!
s
you are welcome
a
:)