Added another workaround to the fix_related_bias_pins script for an error that was shadowed by the first error that was fixed (in the last commit), in which pin VNB was incorrectly assigned pg_type of "nwell" and VPB was incorrectly assigned pg_type of "pwell". The "nwell" and "pwell" also need to be swapped, which is now taken care of by the script.
diff --git a/VERSION b/VERSION index f0f99b9..af7d950 100644 --- a/VERSION +++ b/VERSION
@@ -1 +1 @@ -1.0.335 +1.0.336
diff --git a/sky130/custom/scripts/fix_related_bias_pins.py b/sky130/custom/scripts/fix_related_bias_pins.py index 9948008..222b944 100755 --- a/sky130/custom/scripts/fix_related_bias_pins.py +++ b/sky130/custom/scripts/fix_related_bias_pins.py
@@ -34,6 +34,7 @@ related_re = re.compile('\s*related_bias_pin\s*:\s*"(.+)"\s*;') pg_re = re.compile('\s*pg_pin\s*\(\s*"(.+)"\s*\)\s*{') + well_re = re.compile('\s*pg_type\s*:\s*"(.+)"\s*;') for line in slines: pmatch = pg_re.match(line) @@ -53,6 +54,19 @@ print('Warning: Unknown related bias pin ' + pin_str) current_pin = '' + wmatch = well_re.match(line) + if wmatch: + well_str = wmatch.group(1) + if well_str == 'nwell' and current_pin == 'VNB': + modified = True + line = line.replace(well_str, 'pwell') + elif well_str == 'pwell' and current_pin == 'VPB': + modified = True + line = line.replace(well_str, 'nwell') + else: + print('Warning: Unknown well type ' + well_str) + current_pin = '' + fixedlines.append(line) # Write output