google / skywater-pdk

Open source process design kit for usage with SkyWater Technology Foundry's 130nm node.
https://skywater-pdk.rtfd.io
Apache License 2.0
2.9k stars 378 forks source link

ngspice with reduced memory consumption #272

Open holvo opened 3 years ago

holvo commented 3 years ago

The Skywater PDK offers ngspice compatible subcircuit transistor models with about 180 submodels due to binning of W and L.

ngspice had not been prepared to handle such an overwhelming number, thus even small circuits (400 transistors) have led to 2 GB of memory consumption.

Triggered by Stefan Schippers from XSCHEM, I have developed a ngspice version that reduces memory consumption by a reasonable amount (factor of 10).

Due to the fact that codes changes had to be done at several places in the ngspice code base, more regression testing will be required before adding this feature to main.

The new code is available in the ngspice git branch reduce-mem-pdk. Please have a look and perform tests with small and especially with large circuits and give feedback (here or in the ngspice discussion forums).

To enable this feature, you will have to add set ngbehavior=hs to .spiceinit or spice.rc in your HOME directory.

Holger

holvo commented 3 years ago

The new code plus some more fixes is now on git branch pre-master.

holvo commented 3 years ago

There is a small "stress test" for the new ngspice version available here with 14942 BSIM4.5 transistors, 48376 capacitors, and 33847 resistors, based on the venerable ISCAS85 circuit c7552_ann.net.

holvo commented 3 years ago

The new code plus some more fixes is now on ngspice git branch master. For MS Windows you may find an executable here .