<@U022MV9FS0P> <@U016EM8L91B> <@U016G1URZGA> last ...
# xschem
s
@User @User @User last xschem_sky130 commit (the sky130 xschem libraries and test schematics) now uses open_pdks installed spice models. If anyone has a chance to test and finds issues please report. I have run all test simulations and seems ok at least on my system with a standard open_pdks install. https://github.com/StefanSchippers/xschem_sky130/commit/048c6d64820180073d23110f85641044a0bd9290
y
I tried several test schematics and they all work out of the box. I'll report issues if I encounter. Thanks!
Is it that the sky130.lib.spice loads so much stuff at the launch of ngspice? ngspice takes a very long time to start even for a very simple circuit.
s
create a .spiceinit file with following content:
set ngbehavior=hsa
set ng_nomodcheck
place this file in the directory where the netlist and the ngspice simulator are running (default is ~/.xschem/simulations). This speeds up ngspice startup on sky130 considerably.
y
I don't seem to observe a speed up using the additional settings you suggested. It still takes the same (long) time after the launch and before the message
Compatibility modes selected: hs a
shows up. Interestingly, the ngspice site has a page specific about sky130: http://ngspice.sourceforge.net/applic.html
s
@Yuan Mei are you using an ngspice executable built from github sources? the
ng_nomodcheck
option is very recent...
y
Yes. I am using the latest from github source. And it was configured using
configure --with-x --enable-xspice --disable-debug --enable-cider --with-readline=yes --enable-openmp
Multithreading works but the start up takes long time, as I described earlier. ``ng_nomodcheck`` doesn't seem to make a difference.
s
@Yuan Mei this is strange. on my system this options speeds up pdk parsing from several minutes to -say- 25 seconds...may be @Tim Edwards has some additional suggestions...
t
I really have no idea. For me, the combination of the latest ngspice and the .spiceinit settings did likewise, to reduce the startup time to something on the order of 20 seconds or so (which still seems excessive, but is tolerable).
y
Sorry for digging up the old thread. For the sake of reducing ngspice startup time, would it make sense to split sky130.lib.spice into several files, each corresponding to a particular corner? For instance, sky130.lib.tt.spice, sky130.lib.ff.spice, etc... From my measurement, launching only tt models (keep only the section from
.lib tt
to
.endl tt
, removing everything else) takes less than 5 seconds, which is much nicer for manual analog design flow. One could load different files to simulate in different corners instead of loading the same big file (currently sky130.lib.spice) while specifying a corner as a parameter.
t
That is one solution, but I have not resorted to it in the installed PDK because I consider the long load time to be a bug in ngspice that needs fixing, not something needing a permanent workaround.
s
@Yuan Mei i also agree with @Tim Edwards, ngspice should be fixed to ignore unused corners. For the time being nothing prevents you from writing a wrapper file that only `.include`s the 'xx' corner (you need to open the sky130.lib.spice file and copy the text inside the
.lib xx ... .endl
section (xx = corner you want to simulate).
y
@Stefan Schippers I am doing exactly what you suggested since the load time issue is really getting in the way. I guess I'll just wait for ngspice to get it fixed. Thanks.
👍 1