Screenshot_20201106_130254.png
# xschem
c
Screenshot_20201106_130254.png
m
on the gaw issue, most probably you did not tell ngspice to save a .raw file which gaw uses. From simulation->configure simulator and tools, in the ngspice section replace existing one with this
$terminal -e 'ngspice -i -r "$n.raw" "$N" -a || sh'
c
Thanks @Md Munir Hasan I think that will help, but my VM has just run out of disk space so I have to increase the disk size and then I'll let you know how it goes.
s
if you compiled ngspice yourself ensure you added the --with-x option. If running a precompiled package ensure you have libXaw installed
my golden configure for ngspice is
Copy code
../configure --with-x --enable-xspice --disable-debug --enable-cider --with-readline=yes --prefix=/home/schippes --no-create --no-recursion
i can replicate the same ngspice viewport error if no DISPLAY variable is defined.... ensure DISPLAY=:0 is defined in your bash shells.....
although i don't believe this is your case...
c
@Md Munir Hasan Setting the ngspice section to $terminal -e 'ngspice -i -r "$n.raw" "$N" -a || sh' makes the ngspice window now mention that it is generating the raw file, and now the error message in the terminal from which xschem was started says: gaw -> untitled.raw table not defined gaw -> Current table not defined @Stefan Schippers Thanks, I will use your options and recompile ngspice (and perhaps I should checkout a stable revision rather than just picking head from their repo???)
m
In that case you probably have to rebuild ngspice as stefan mentioned.
c
@Stefan Schippers I configured ngspice with your options (except --prefix) and recompiled. Now typing plot a b in the ngspice window does work (THANKS!), but in xschem "Send highlighted nets to GAW" still does not plot anything and in the terminal from which xschem was launched, I get the messages:
Copy code
chrisj@debvm:~$ xschem
% gaw -> untitled.raw table not defined
gaw -> Current table not defined
gaw -> Current table not defined
s
@Chris Jones if you run simulator in interactive mode (you see the ngspice terminal window and prompt) you must save the file, in this case after simulation:
write untitled.raw
. If you run in background mode (see '`Simulation->Configure simulators and tools-> Ngspice batch`') this saving is done automatically.
c
Hm. When I click simulate, I do see the ngspice terminal window and prompt, and thanks to the advice earlier in this thread from Md Munir Hasan it was writing a raw file, to ~/.xschem/simulations/untitled.raw - for now I had been running xschem from my home directory. Changing to batch mode resulted in the same errors when I tried to send waveforms to GAW.
s
@Chris Jones when you start gaw does it come with the raw file preloaded? You should see a signal list window with the name of the raw file... Does the raw filename match with the circuit name (excluding extension) ?
@Chris Jones another important thing to remember: sending signals to gaw works if the circuit you are simulating is the topmost hierarchy ( so do not open a circuit, descend into a sub block, simulate and try to send signals to gaw, in this case gaw assumes you are simulating the parent level schematic and descended into a leaf schematic to probe a sub-net).
@Chris Jones another hint: sending signals to gaw works if you start gaw using xschem's 'Wave' button, so gaw gets called with the right .raw filename...
c
@Stefan Schippers That was it! I had started gaw from a terminal, and it connected, but it did not know the .raw filename because I didn't use the waves button. Sorry I should have remembered / noticed that when I watched your video. Sorry!
💪 1
s
That's nice. the 'send to gaw' feature is relatively new, before i just used to start gaw with xschem's 'Waves' button and then browse signals with gaw's signal list. The communication protocol of gaw is not very complete and gaw author is no more working on it. I need to check if a 'Load filename' is present in the command set. By the way did you build gaw from my xschem_gaw git repo? I have forked gaw so i added my little patches to make it work better with xschem (show same color as xschem nets, if doing multiple sweeps add all sweeps to gaw window, added also a 'reload_all' command that can be sent remotely from xschem prompt (gaw_cmd reload_all) to reload waves, although there is a button on gaw for that...).
c
Ah, no, I didn't know about your fork of gaw. I will try it. Thanks.
s
there are some nice additions in xschem-gaw, for example if you have more panels, clicking first a panel and then doing 'alt-g' on a selected net in xschem will send the net in that panel...
c
https://skywater-pdk.slack.com/archives/C017P3RAD42/p1604631250375300?thread_ts=1604629283.372200&cid=C017P3RAD42 For anyone reading this thread later, when compiling ngspice, in the step where one runs ../configure, I found that I had to remove the option --no-create otherwise I would not get any makefile generated. The time make worked for me with that option, it was only because I had previously run it without that option.