mirror of https://github.com/VLSIDA/OpenRAM.git
deepcopy overide for instance
This commit is contained in:
parent
e23289d5ae
commit
0111620c91
|
|
@ -200,9 +200,17 @@ class instance(geometry):
|
|||
self.width = round_to_grid(mod.width)
|
||||
self.height = round_to_grid(mod.height)
|
||||
self.compute_boundary(offset, mirror, rotate)
|
||||
|
||||
debug.info(4, "creating instance: " + self.name)
|
||||
|
||||
def __deepcopy__(original, memo):
|
||||
new_inst = instance(original.name+"_copy", original.mod)
|
||||
new_inst.rotate = original.rotate
|
||||
new_inst.offset = original.offset
|
||||
new_inst.mirror = original.mirror
|
||||
new_inst.is_bitcell = original.is_bitcell
|
||||
return new_inst
|
||||
|
||||
|
||||
def get_blockages(self, lpp, top=False):
|
||||
""" Retrieve blockages of all modules in this instance.
|
||||
Apply the transform of the instance placement to give absolute blockages."""
|
||||
|
|
|
|||
|
|
@ -479,7 +479,6 @@ class layout():
|
|||
|
||||
def add_existing_inst(self, inst, name):
|
||||
new_inst = deepcopy(inst)
|
||||
new_inst.mod = inst.mod
|
||||
self.mods.add(new_inst.mod)
|
||||
if name:
|
||||
new_inst.name = name
|
||||
|
|
|
|||
Loading…
Reference in New Issue