If you update your open_pdks installation and upda...
# xschem
s
If you update your open_pdks installation and update xschem (or just update xschem and manually copy the sky130_tests symbols to your final
.../share/pdk/sky130A/libs.tech/xschem/sky130_tests
directory) you will be able to test the
test_multisim.sch
schematic that runs Xyce or ngspic simulations with no modifications. There is also a launcher that runs ngspice and Xyce simulations in parallel for testing purposes. ( @Steven Bos @Harald Pretl)
🙌 1
🌍 1
s
Thanks for the mention @Stefan Schippers, there is so much automation going on. Xschem is a powerhouse. Xyce (serial/parallel) seems to be a fair bit faster (though not sure at what cost?). Looking forward to more examples from other users for comparison
@Stefan Schippers in your video the ngspice start-up is almost instant and concludes with a extensive report. How can did you manage that?
I am using ngspice version 37 and have the .spiceinit in the same folder as my spice files. The .spiceinit file contains
Copy code
set ngbehavior=hsa
set ng_nomodcheck
h
@Steven Bos You can preprocess the model files for a huge speedup in ngspice startup. See here: https://github.com/hpretl/iic-osic/blob/main/iic-spice-model-red.py
s
Thanks @Harald Pretl, I will check that out. It seems in the video that spice model file reducer is not used correct?
The essence of the script is this leading and trailing space trimmed regular expression that parses over all the included netlist files correct?
Copy code
newfile = re.findall(r'"(.*?)(?<!\\)"', line_trim)
Wouldnt that also benefit xyce? Or is it already doing something similar internally before starting simulation?
s
@Steven Bos to speed up ngspice you can also load just the single corner you need. Try to use
sky130_fd_pr/corner.sym
h
@Steven Bos Cleaning up the model files (which are many) and trimming them, plus splitting the corners (as @Stefan Schippers suggests) would help any simulator. To which extend remains the question.
s
@Harald Pretl you are right. The big unanswered question (@Tim Edwards also had investigated this) is why ngspice insists on parsing all corners if at the very top level (the .lib line in the netlist) there is only one corner specified, so all the other corners in the top
sky130.lib.spice
can be skipped (and this file is small)
@Steven Bos the example in the video does not use sky130 models, it is a rc circuit, so simulators start instantly. For the report add a
acct
line at the end of the .control section
t
@Stefan Schippers: Holger Vogt gave me some handwaving argument about why ngspice has to parse all the corner models; I think the upshot is that it's coding "busy work" and is a low priority for the ngspice developers. A really simple workaround is that you just create a new lib file with only the corner you want to use. It seems like it should be relatively simple for ngspice to do the same thing on the fly, though.
s
@Tim Edwards exactly, for xschem i created a corner.sym element that does exactly that. You specify a corner and it lets ngspice see only that corner.
t
Right; it just seems like a really awkward workaround for something that the tool should be able to do itself.