Complete implementation of monte carlo simulation. Enables the
scripts that convert the statistics blocks in the model files
into ngspice-compatible syntax, both for mismatch parameters
(inside the model definitions) and process variation (in .param
lines outside the model definitions). Added new block name "mc"
for use with the ".lib" command to enable the models with
process variation instead of a corner model. Use of ngspice
now requires that every testbench set ".param mc_mm_switch=0|1"
to disble or enable the parameter mismatch, since the mismatch
setting is independent of the corner model used.
diff --git a/sky130/custom/scripts/mismatch_params.py b/sky130/custom/scripts/mismatch_params.py
index 1cb5ad8..eda8462 100755
--- a/sky130/custom/scripts/mismatch_params.py
+++ b/sky130/custom/scripts/mismatch_params.py
@@ -109,8 +109,10 @@
infile.close()
outfile.close()
if replaced_something:
- print("Something was replaced in '{}', backed up original file and replaced with processed one.".format(infile_name))
- os.rename(infile_name, infile_name + '.orig')
+ # print("Something was replaced in '{}', backed up original file"
+ # + " and replaced with processed one.".format(infile_name))
+ print("Something was replaced in '{}'.".format(infile_name))
+ # os.rename(infile_name, infile_name + '.orig')
os.rename(outfile_name, infile_name)
else:
print("Nothing was replaced in '{}'.".format(infile_name))