mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-09-04 08:44:12 +02:00
Change inheritance inits to use super
This commit is contained in:
@@ -97,7 +97,7 @@ class channel_route(design.design):
|
||||
"""
|
||||
name = "cr_{0}".format(channel_route.unique_id)
|
||||
channel_route.unique_id += 1
|
||||
design.design.__init__(self, name)
|
||||
super().__init__(name)
|
||||
|
||||
self.netlist = netlist
|
||||
self.offset = offset
|
||||
|
||||
@@ -34,7 +34,7 @@ class contact(hierarchy_design.hierarchy_design):
|
||||
# This will ignore the name parameter since
|
||||
# we can guarantee a unique name here
|
||||
|
||||
hierarchy_design.hierarchy_design.__init__(self, name)
|
||||
super().__init__(name)
|
||||
debug.info(4, "create contact object {0}".format(name))
|
||||
|
||||
self.add_comment("layers: {0}".format(layer_stack))
|
||||
|
||||
@@ -20,7 +20,7 @@ class design(hierarchy_design):
|
||||
"""
|
||||
|
||||
def __init__(self, name):
|
||||
hierarchy_design.__init__(self, name)
|
||||
super().__init__(name)
|
||||
|
||||
self.setup_drc_constants()
|
||||
self.setup_layer_constants()
|
||||
|
||||
@@ -160,7 +160,7 @@ class instance(geometry):
|
||||
"""
|
||||
def __init__(self, name, mod, offset=[0, 0], mirror="R0", rotate=0):
|
||||
"""Initializes an instance to represent a module"""
|
||||
geometry.__init__(self)
|
||||
super().__init__()
|
||||
debug.check(mirror not in ["R90", "R180", "R270"],
|
||||
"Please use rotation and not mirroring during instantiation.")
|
||||
|
||||
@@ -284,7 +284,7 @@ class path(geometry):
|
||||
|
||||
def __init__(self, lpp, coordinates, path_width):
|
||||
"""Initializes a path for the specified layer"""
|
||||
geometry.__init__(self)
|
||||
super().__init__()
|
||||
self.name = "path"
|
||||
self.layerNumber = lpp[0]
|
||||
self.layerPurpose = lpp[1]
|
||||
@@ -322,7 +322,7 @@ class label(geometry):
|
||||
|
||||
def __init__(self, text, lpp, offset, zoom=-1):
|
||||
"""Initializes a text label for specified layer"""
|
||||
geometry.__init__(self)
|
||||
super().__init__()
|
||||
self.name = "label"
|
||||
self.text = text
|
||||
self.layerNumber = lpp[0]
|
||||
@@ -366,7 +366,7 @@ class rectangle(geometry):
|
||||
|
||||
def __init__(self, lpp, offset, width, height):
|
||||
"""Initializes a rectangular shape for specified layer"""
|
||||
geometry.__init__(self)
|
||||
super().__init__()
|
||||
self.name = "rect"
|
||||
self.layerNumber = lpp[0]
|
||||
self.layerPurpose = lpp[1]
|
||||
|
||||
@@ -30,7 +30,7 @@ class route(design):
|
||||
def __init__(self, obj, layer_stack, path, layer_widths=[None,1,None]):
|
||||
name = "route_{0}".format(route.unique_route_id)
|
||||
route.unique_route_id += 1
|
||||
design.__init__(self, name)
|
||||
super().__init__(name)
|
||||
debug.info(3, "create route obj {0}".format(name))
|
||||
|
||||
self.obj = obj
|
||||
|
||||
Reference in New Issue
Block a user