diff --git a/sky130_density_fix/replace_decap.py b/sky130_density_fix/replace_decap.py index 9dfc073b..3f6e67b4 100644 --- a/sky130_density_fix/replace_decap.py +++ b/sky130_density_fix/replace_decap.py @@ -80,8 +80,11 @@ def cell_dimensions_equal(cell1, cell2): inst.cell = replacement_cell replacements += 1 -print(f"Replaced {replacements} cells out of {matches} matches.") -print(f"Writing to {output_gds}...") +if replacements > 0: + print(f"Replaced {replacements} cells out of {matches} matches.") + print(f"Writing to {output_gds}...") + user_layout.write(output_gds) + print("Done.") +else: + print(f"No cells replaced.") -user_layout.write(output_gds) -print("Done.")