Hi, I'm a student who is currently trying to learn...
# analog-design
j
Hi, I'm a student who is currently trying to learn how to use xschem in conjunction with ngspice. I attempted to make and simulate an inverter using the Sky130 PDK. The simulation seems to have occurred (I clicked netlist, and then simulate). However, when I click waves, gaw does not show any waveforms. Is there an action that I am forgetting? Thank you for the help. *Side note: I am using the IIC-OSIC-TOOLS all in one container.
s
@Jon Ho replace the last two lines of your commands with:
.control
save all
dc vin 0 1.8 0.001
write inverter.raw
.endc
@Jon Ho Note: within .control / .endc no dots (.) on
dc
,
save
,
write
commands
@Jon Ho you can also view simulation results directly into xschem now, see tutorial video
j
@Stefan Schippers Thank you very much for the help. It works. IN the future, do I have to use .control and .endc to capsulate all of my spice directives (in order for this to work). Furthermore, do I have to always "write inverter.raw". I assume writing inverter.raw essentially dumps all of my outputs in a file that gaw can read. Please correct me if I'm wrong on this.
s
@Jon Ho In general you use .
control / .endc
if you use ngspice in interactive mode (
ngspice-i circuit.spice
) . You use the old school .tran / .dc / .save if you use ngspice in background mode (
ngspice -r circuit.raw -b  circuit.spice
) In batch mode by default ngspice saves all voltages and all voltage source currents if no specific .save v(...) is present in the netlist.
@Jon Ho about the '`write inverter.raw`' instruction you use the same name of the circuit, so xschem will call gaw automatically with the correct .raw file name.
j
Thank you @Stefan Schippers. I greatly appreciate your help!