Stefan Schippers
05/06/2022, 8:59 AM.spiceinit
file in the directory where ngspice is running, the second line speeds up model loading.
set ngbehavior=hsa
set ng_nomodcheck
Aleksandar Pajkanovic
05/06/2022, 9:01 AM.spiceinit
...set ng_nomodcheck
line, however, no change in behavior at all when added. I went ahead and actually measured the time for .op
simulation of a few transistor circuit, and it's 107 seconds either way, with and without ng_nomodcheck
set.
==
Is there maybe a way to somehow focus the engine to loading just a subset of models (I do use only two kinds of devices)?Stefan Schippers
05/06/2022, 9:23 AMCompatibility modes selected: hs a
schippes@mazinga:~/.xschem/simulations$ ngspice -v
******
** ngspice-36+ : Circuit level simulation program
Aleksandar Pajkanovic
05/06/2022, 9:29 AMCompatibility modes selected: hs a
Circuit: **.subckt miel21_tb_opamp_op
Scale set to 1e-06
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
Reference value : 0.00000e+00
No. of Data Rows : 1
Stefan Schippers
05/06/2022, 9:31 AMAleksandar Pajkanovic
05/06/2022, 9:32 AMStefan Schippers
05/06/2022, 9:38 AMAleksandar Pajkanovic
05/06/2022, 9:39 AMStefan Schippers
05/06/2022, 9:41 AMAleksandar Pajkanovic
05/06/2022, 9:56 AM******
** ngspice-36+ : Circuit level simulation program
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Copyright 2001-2020, The ngspice team.
** Please get your ngspice manual from <http://ngspice.sourceforge.net/docs.html>
** Please file your bug-reports at <http://ngspice.sourceforge.net/bugrep.html>
** Creation Date: Fri May 6 09:49:12 UTC 2022
******
Stefan Schippers
05/06/2022, 10:03 AM-with-readline=yes
--enable-openmp --no-create --no-recursion--with-x
also enables graphical plottingAleksandar Pajkanovic
05/06/2022, 10:05 AMStefan Schippers
05/06/2022, 10:08 AMAleksandar Pajkanovic
05/06/2022, 10:08 AMHarald Pretl
05/06/2022, 10:56 AMiic-spice-model-red.py
My ngspice starting time is 5sec or so.Tim Edwards
05/06/2022, 12:41 PMStefan Schippers
05/06/2022, 1:03 PM.lib /home/schippes/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt
I take only the 'tt' portion of the .lib file:
.param mc_mm_switch=0
.param mc_pr_switch=0
* MOSFET
.include /home/schippes/share/pdk/sky130A/libs.tech/ngspice/corners/tt.spice
* Resistor/Capacitor
.include /home/schippes/share/pdk/sky130A/libs.tech/ngspice/r+c/res_typical__cap_typical.spice
.include /home/schippes/share/pdk/sky130A/libs.tech/ngspice/r+c/res_typical__cap_typical__lin.spice
* Special cells
.include /home/schippes/share/pdk/sky130A/libs.tech/ngspice/corners/tt/specialized_cells.spice
with this single change ngspice parsing goes from 30 seconds down to 6.5 seconds on my system. The real question is why ngspice (apparently) insists on parsing unused corners (@User also dealt with this issue a lot).Aleksandar Pajkanovic
05/10/2022, 9:34 AM