Made an extension to the handling of "dev/gauss" syntax in the mismatch_params.py script that takes care of a one-off syntax in the sky130_fd_pr__cap_var_hvt model file that has to be handled a little differently than all the others.
diff --git a/VERSION b/VERSION index 337b234..ef6675f 100644 --- a/VERSION +++ b/VERSION
@@ -1 +1 @@ -1.0.304 +1.0.305
diff --git a/sky130/custom/scripts/mismatch_params.py b/sky130/custom/scripts/mismatch_params.py index c9388cc..91e35fa 100755 --- a/sky130/custom/scripts/mismatch_params.py +++ b/sky130/custom/scripts/mismatch_params.py
@@ -114,6 +114,10 @@ gaussrex = re.compile('\'[ \t]+dev\/gauss=\'', re.IGNORECASE) +# Same as above, for parameters that are not already expressions. + +gauss2rex = re.compile('=[ \t]*([^ \t]+)[ \t]+dev\/gauss=\'', re.IGNORECASE) + #-------------------------------------------------------------------- # Step 2. Make replacements #-------------------------------------------------------------------- @@ -142,6 +146,12 @@ replaced_something = True print(" Line {}: Found PSPICE dev/gauss and replaced.".format(line_number)) + gmatch = gauss2rex.search(newline) + if gmatch: + newline = gauss2rex.sub("='\g<1>+" + mm_switch_param + '*AGAUSS(0,1.0,1)*', newline) + replaced_something = True + print(" Line {}: Found PSPICE dev/gauss and replaced.".format(line_number)) + if state == 'before_mismatch': outfile.write(newline) mmatch = mmrex.match(newline)