Hi, I have been trying to run some of the examples on sky130 open_pdk library for xschem. I have not...
e
Hi, I have been trying to run some of the examples on sky130 open_pdk library for xschem. I have noticed that whenever I run a simulation, for example test_inv.sch, it takes a lot of time (>15 minutes) to simulate. On the other hand a simple RC circuit takes no-time to simulate. One difference between the netlists are the models, but not sure if that might be causing the delay. I am pretty sure this is a problem with my setup, but I am not sure where start to debugging this. I have followed the instructions on: http://repo.hu/projects/xschem/xschem_man/install_xschem.html. Has anyone seen something like this? Or find a way to solve it? Thanks I was suspecting that maybe I dont have all prerequired packages to build it (using configure, make and make install). But I havent seen any errors when running the configure file or the make files.
t
Make sure that you copy the file
spinit
from open_pdks
libs.tech/ngspice/spinit
to the local directory where you are running ngspice, and rename the file to
.spiceinit
. All of the simulation time in ngspice is taken up by reading in the models. The
.spiceinit
file sets an option that deals with the massive number of bins. Unfortunately, there is still an issue with ngspice reading all of the corner files in
sky130.lib.spice
instead of just the one being called out on the
.lib
line, which causes simulation startup times to take maybe a minute or more (instead of seconds, as it should be). But the
.spiceinit
should knock down most of that startup delay issue.
Also unfortunately, the option setting has to be set in
.spiceinit
and cannot be in the file being simulated, which means that xschem can't be set up to provide this; you need to copy the file by hand (but I am working on an analog flow in open_pdks that will do that kind of setup step automatically).
e
Thanks Tim! I was wondering how all the ngspice and xschem folders generated by open_pdk interfaced between each other, (I have a related question that i will ask on open_pdks) So one work around could be to comment out all other libraries that are not tt. And if needed re-comment other libraries if using other corners. Or faster, as was suggested here, to have inlcludes.
p
To me this sounds like we should try to get ngspice enhanced so that we can provide it in the file to be simulated, instead of the .initspice file
t
@Philipp Gühring: Agreed. Also, ngspice really, really needs to be fixed so that it does not read all the includes in sky130.lib.spice that are not in the set specified by the given corner. It is easy to show that that is exactly what it's doing, because the run time of ngspice is proportional to the number of corner sections defined in sky130.lib.spice.