Skip to content

Commit

Permalink
remove OptionalSuffix
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasc-ubc committed Nov 5, 2024
1 parent 284db8c commit 2df15a0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions klayout_dot_config/python/SiEPIC/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3177,7 +3177,7 @@ def layout_diff(cell1, cell2, tol = 1, verbose=True):
return diff_count


def replace_cell(layout, cell_x_name = None, cell_y_name=None, cell_y_file=None, cell_y_library=None, cell_ref_bb = None, Exact = True, RequiredCharacter = '$', run_layout_diff = True, debug = False):
def replace_cell(layout, cell_x_name = None, cell_y_name=None, cell_y_file=None, cell_y_library=None, cell_ref_bb = None, Exact = True, RequiredCharacter = '$', run_layout_diff = False, debug = False):
'''
SiEPIC-Tools: scripts.replace_cell
Search and replace: cell_x with cell_y
Expand Down Expand Up @@ -3237,10 +3237,7 @@ def replace_cell(layout, cell_x_name = None, cell_y_name=None, cell_y_file=None,
# 1) cell name exact matching cell_x_name, OR
# 2) that begin with the cell name, i.e., xxx* is matched
# i.e., xxx and xxx* are matched
if OptionalSuffix:
cells_x += [cell for cell in layout.each_cell() if cell.name.removesuffix(OptionalSuffix).find(cell_x_name+RequiredCharacter) == 0]
else:
cells_x += [cell for cell in layout.each_cell() if cell.name.find(cell_x_name+RequiredCharacter) == 0]
cells_x += [cell for cell in layout.each_cell() if cell.name.find(cell_x_name+RequiredCharacter) == 0]

# replacement for all cells that:
# 1) cell name exact matching cell_x_name, OR
Expand Down

0 comments on commit 2df15a0

Please sign in to comment.