mirror of https://github.com/VLSIDA/OpenRAM.git
PEP8 cleanup
This commit is contained in:
parent
c96a6d0b9d
commit
848241a3ad
|
|
@ -66,14 +66,17 @@ class geometry:
|
|||
self.compute_boundary(self.offset, self.mirror, self.rotate)
|
||||
|
||||
def compute_boundary(self, offset=vector(0, 0), mirror="", rotate=0):
|
||||
""" Transform with offset, mirror and rotation to get the absolute pin location.
|
||||
We must then re-find the ll and ur. The master is the cell instance. """
|
||||
"""
|
||||
Transform with offset, mirror and rotation to get the absolute pin location.
|
||||
We must then re-find the ll and ur. The master is the cell instance.
|
||||
"""
|
||||
if OPTS.netlist_only:
|
||||
self.boundary = [vector(0, 0), vector(0, 0)]
|
||||
return
|
||||
|
||||
(ll, ur) = [vector(0, 0), vector(self.width, self.height)]
|
||||
|
||||
# Mirroring is performed before rotation
|
||||
if mirror == "MX":
|
||||
ll = ll.scale(1, -1)
|
||||
ur = ur.scale(1, -1)
|
||||
|
|
@ -202,7 +205,6 @@ class instance(geometry):
|
|||
new_blockages.append(self.transform_coords(b, self.offset, mirr, angle))
|
||||
return new_blockages
|
||||
|
||||
|
||||
def gds_write_file(self, new_layout):
|
||||
"""Recursively writes all the sub-modules in this instance"""
|
||||
debug.info(4, "writing instance: " + self.name)
|
||||
|
|
@ -225,7 +227,6 @@ class instance(geometry):
|
|||
self.update_boundary()
|
||||
debug.info(3, "placing instance {}".format(self))
|
||||
|
||||
|
||||
def get_pin(self, name, index=-1):
|
||||
""" Return an absolute pin that is offset and transformed based on
|
||||
this instance location. Index will return one of several pins."""
|
||||
|
|
@ -237,7 +238,7 @@ class instance(geometry):
|
|||
return pin
|
||||
else:
|
||||
pins = copy.deepcopy(self.mod.get_pin(name))
|
||||
pin.transform(self.offset,self.mirror,self.rotate)
|
||||
pins.transform(self.offset, self.mirror, self.rotate)
|
||||
return pin[index]
|
||||
|
||||
def get_num_pins(self, name):
|
||||
|
|
@ -265,6 +266,7 @@ class instance(geometry):
|
|||
""" override print function output """
|
||||
return "( inst: " + self.name + " @" + str(self.offset) + " mod=" + self.mod.name + " " + self.mirror + " R=" + str(self.rotate) + ")"
|
||||
|
||||
|
||||
class path(geometry):
|
||||
"""Represents a Path"""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue