Stefan Schippers
03/23/2024, 9:43 AMmycorners.lib
like this:
* mycorners lib file
.lib mycorners
.param MC_MM_SWITCH=0
.param MC_PR_SWITCH=0
.param corner_factor=1
.param process_mc_factor=1
.param mismatch_factor=1
.include continuous/parameters_fet_XX.spice
.include continuous/parameters_res_YY.spice
.include continuous/parameters_cap_ZZ.spice
* Include the model files
.include continuous/models_global.spice
.include continuous/models_fet.spice
.include continuous/models_bjt.spice
.include continuous/models_diodes.spice
.include continuous/models_resistors.spice
.include continuous/models_capacitors.spice
* Legacy discrete models (RF, vpp caps, SONOS, and SRAM)
.include corners/XX.spice
.include corners/XX/specialized_cells.spice
.include rescap/res_YY__cap_ZZ.spice
.include rescap/res_YY__cap_ZZ__lin.spice
.endl mycorners
where:
• XX
can be tt
, ss
, ff
, fs
, sf
• YY
and ZZ
can be nom
, low
, high
. "`nom`" replaced with "`typical`" in the rescap lines.
also in all include lines you must give the correct path for the various files, unless you place this file in the same directory as sky130.lib.spice
Then you call this file in the testbench with:
.lib /path/to/mycorners.lib mycorners
Luis Henrique Rodovalho
03/23/2024, 10:17 AMTim Edwards
04/03/2024, 3:58 PMsky130.lib.spice
. I had originally avoided doing this because ngspice was reading all of the entries in the file before selecting the one specified in the .lib
argument, and every entry would slow down ngspice's startup time significantly. That got fixed, so now it makes sense just to define every single permutation.