Matt Venn
03/21/2024, 9:13 AM.param mc_mm_switch=0
. I think it's only required when I'm using the sky130 libraries? Are there any docs about what it does? Also, I have 2 computers, one needs the param set to simulate, the other doesn't. Both are using the same xschem and pdk version.Harald Pretl
03/21/2024, 9:25 AMStefan Schippers
03/21/2024, 9:37 AM.lib /.../.../pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt
the specified corner (tt
) is read from the file:
* Typical corner (tt)
.lib tt
.param mc_mm_switch=0
.param mc_pr_switch=0
* MOSFET
.include "corners/tt.spice"
* Resistor/Capacitor
.include "r+c/res_typical__cap_typical.spice"
.include "r+c/res_typical__cap_typical__lin.spice"
* Special cells
.include "corners/tt/specialized_cells.spice"
.endl tt
You see the .lib file sets the montecarlo / mismatch switches to zero.
The tt_mm
mismatch corner sets one of these switches:
* Typical corner with mismatch (tt_mm)
.lib tt_mm
.param mc_mm_switch=1
.param mc_pr_switch=0
* MOSFET
.include "corners/tt.spice"
* Resistor/Capacitor
.include "r+c/res_typical__cap_typical.spice"
.include "r+c/res_typical__cap_typical__lin.spice"
* Special cells
.include "corners/tt/specialized_cells.spice"
.endl tt_mm
and the Montecarlo corner (mc
) sets the other:
* Monte Carlo process variation
.lib mc
.param mc_mm_switch=0
.param mc_pr_switch=1
.include "parameters/critical.spice"
.include "parameters/montecarlo.spice"
.endl mc
So as far as I know you should not need to set these parameters yourself.Matt Venn
03/21/2024, 9:46 AMStefan Schippers
03/21/2024, 9:50 AMset ngbehavior=hsa
set ng_nomodcheck
set num_threads=4
The last line is optional, The first one is very important, since it tells ngspice the .lib file format to use (hspice-like)Matt Venn
03/21/2024, 9:57 AMMatt Venn
03/21/2024, 9:57 AM