mirror of https://github.com/VLSIDA/OpenRAM.git
Improve print output for debugging layout objects.
This commit is contained in:
parent
be20408fb2
commit
a35bf29bdd
|
|
@ -95,13 +95,3 @@ class design(hierarchy_design):
|
|||
total_module_power += inst.mod.analytical_power(corner, load)
|
||||
return total_module_power
|
||||
|
||||
def __str__(self):
|
||||
""" override print function output """
|
||||
pins = ",".join(self.pins)
|
||||
insts = [" {}".format(x) for x in self.insts]
|
||||
objs = [" {}".format(x) for x in self.objs]
|
||||
s = "********** design {0} **********\n".format(self.name)
|
||||
s += "\n pins ({0})={1}\n".format(len(self.pins), pins)
|
||||
s += "\n objs ({0})=\n{1}".format(len(self.objs), "\n".join(objs))
|
||||
s += "\n insts ({0})=\n{1}\n".format(len(self.insts), "\n".join(insts))
|
||||
return s
|
||||
|
|
|
|||
|
|
@ -371,8 +371,8 @@ class rectangle(geometry):
|
|||
|
||||
def __str__(self):
|
||||
""" override print function output """
|
||||
return "rect: @" + str(self.offset) + " " + str(self.width) + "x" + str(self.height) + " layer=" +str(self.layerNumber)
|
||||
return self.__repr__()
|
||||
|
||||
def __repr__(self):
|
||||
""" override print function output """
|
||||
return "( rect: @" + str(self.offset) + " " + str(self.width) + "x" + str(self.height) + " layer=" + str(self.layerNumber) + " )"
|
||||
return "( rect: @" + str(self.offset) + " WxH=" + str(self.width) + "x" + str(self.height) + " layer=" + str(self.layerNumber) + " )"
|
||||
|
|
|
|||
|
|
@ -100,7 +100,14 @@ class hierarchy_design(hierarchy_spice.spice, hierarchy_layout.layout):
|
|||
|
||||
def __str__(self):
|
||||
""" override print function output """
|
||||
return "design: " + self.name
|
||||
pins = ",".join(self.pins)
|
||||
insts = [" {}".format(x) for x in self.insts]
|
||||
objs = [" {}".format(x) for x in self.objs]
|
||||
s = "********** design {0} **********".format(self.name)
|
||||
s += "\n pins ({0})={1}\n".format(len(self.pins), pins)
|
||||
s += "\n objs ({0})=\n{1}\n".format(len(self.objs), "\n".join(objs))
|
||||
s += "\n insts ({0})=\n{1}\n".format(len(self.insts), "\n".join(insts))
|
||||
return s
|
||||
|
||||
def __repr__(self):
|
||||
""" override print function output """
|
||||
|
|
|
|||
Loading…
Reference in New Issue