Skip to content

Commit

Permalink
Added cache option to rendering script
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshgore committed Nov 7, 2024
1 parent fc4e5fe commit a637f7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spydrnet_physical/util/FPGAGridGen.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ def _unique(self, sequence):
u = [x for x in sequence if not (x in seen or seen.add(x))]
return [val for sublist in u for val in sublist]

def merge_symbol(self, inst_list, new_symbol_name, style=None):
def merge_symbol(self, inst_list, new_symbol_name, style=None, instance_cache=None, symbol_cache=None):
points = []

def add_point(direction, distance):
Expand All @@ -629,8 +629,8 @@ def add_point(direction, distance):
points.append(new_pt)

for each in inst_list:
inst = self.get_instance(each)
symbol = self.get_symbol_of_instance(each)
inst = instance_cache[each] if instance_cache else self.get_instance(each)
symbol = symbol_cache[each] if symbol_cache else self.get_symbol_of_instance(each)
pt = (inst.attribs["x"], inst.attribs["y"])
if symbol.elements[0].elementname == "rect":
ele = symbol.elements[0]
Expand Down

0 comments on commit a637f7c

Please sign in to comment.