mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-09-06 09:18:34 +02:00
Move place function to instance class rather than hierarchy.
This commit is contained in:
@@ -195,6 +195,14 @@ class instance(geometry):
|
||||
mirror=self.mirror,
|
||||
rotate=self.rotate)
|
||||
|
||||
def place(self, offset, mirror="R0", rotate=0):
|
||||
""" This updates the placement of an instance. """
|
||||
debug.info(3, "placing instance {}".format(self.name))
|
||||
# Update the placement of an already added instance
|
||||
self.offset = offset
|
||||
self.mirror = mirror
|
||||
self.rotate = rotate
|
||||
self.update_boundary()
|
||||
|
||||
|
||||
def get_pin(self,name,index=-1):
|
||||
|
||||
@@ -119,17 +119,6 @@ class layout(lef.lef):
|
||||
for pin in pin_list:
|
||||
pin.rect = [pin.ll() - offset, pin.ur() - offset]
|
||||
|
||||
def place_inst(self, name, offset, mirror="R0", rotate=0):
|
||||
""" This updates the placement of an instance. """
|
||||
inst = self.get_inst(name)
|
||||
debug.info(3, "placing instance {}".format(inst))
|
||||
# Update the placement of an already added instance
|
||||
inst.offset = offset
|
||||
inst.mirror = mirror
|
||||
inst.rotate = rotate
|
||||
inst.update_boundary()
|
||||
return inst
|
||||
|
||||
def add_inst(self, name, mod, offset=[0,0], mirror="R0",rotate=0):
|
||||
"""Adds an instance of a mod to this module"""
|
||||
self.insts.append(geometry.instance(name, mod, offset, mirror, rotate))
|
||||
|
||||
Reference in New Issue
Block a user