Add boundary to every module and pgate for visual debug.

This commit is contained in:
mrg 2019-05-27 16:32:38 -07:00
parent 1268a7927b
commit fc12ea24e9
23 changed files with 35 additions and 10 deletions

View File

@ -880,6 +880,13 @@ class layout():
""" """
self.create_channel_route(netlist, offset, layer_stack, pitch, vertical=False) self.create_channel_route(netlist, offset, layer_stack, pitch, vertical=False)
def add_boundary(self):
""" Add boundary for debugging dimensions """
self.add_rect(layer="boundary",
offset=vector(0,0),
height=self.height,
width=self.width)
def add_enclosure(self, insts, layer="nwell"): def add_enclosure(self, insts, layer="nwell"):
""" Add a layer that surrounds the given instances. Useful """ Add a layer that surrounds the given instances. Useful
for creating wells, for example. Doesn't check for minimum widths or for creating wells, for example. Doesn't check for minimum widths or

View File

@ -36,6 +36,7 @@ class pbitcell(design.design):
self.create_netlist() self.create_netlist()
# We must always create the bitcell layout because some transistor sizes in the other netlists depend on it # We must always create the bitcell layout because some transistor sizes in the other netlists depend on it
self.create_layout() self.create_layout()
self.add_boundary()
def create_netlist(self): def create_netlist(self):
self.add_pins() self.add_pins()
@ -260,11 +261,6 @@ class pbitcell(design.design):
self.height = self.topmost_ypos - self.botmost_ypos self.height = self.topmost_ypos - self.botmost_ypos
self.center_ypos = 0.5*(self.topmost_ypos + self.botmost_ypos) self.center_ypos = 0.5*(self.topmost_ypos + self.botmost_ypos)
# Add this boundary for visual debug
self.add_rect(layer="boundary",
offset=vector(self.leftmost_xpos,self.botmost_ypos),
height=self.height,
width=self.width)
def create_storage(self): def create_storage(self):
""" """

View File

@ -47,6 +47,7 @@ class bank(design.design):
if not OPTS.netlist_only: if not OPTS.netlist_only:
debug.check(len(self.all_ports)<=2,"Bank layout cannot handle more than two ports.") debug.check(len(self.all_ports)<=2,"Bank layout cannot handle more than two ports.")
self.create_layout() self.create_layout()
self.add_boundary()
def create_netlist(self): def create_netlist(self):

View File

@ -42,6 +42,7 @@ class bank_select(design.design):
self.place_instances() self.place_instances()
self.route_instances() self.route_instances()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()

View File

@ -68,6 +68,8 @@ class bitcell_array(design.design):
self.add_layout_pins() self.add_layout_pins()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def add_pins(self): def add_pins(self):

View File

@ -67,6 +67,7 @@ class control_logic(design.design):
self.place_instances() self.place_instances()
self.route_all() self.route_all()
#self.add_lvs_correspondence_points() #self.add_lvs_correspondence_points()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()

View File

@ -52,6 +52,7 @@ class delay_chain(design.design):
self.place_inverters() self.place_inverters()
self.route_inverters() self.route_inverters()
self.add_layout_pins() self.add_layout_pins()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def add_pins(self): def add_pins(self):

View File

@ -44,6 +44,7 @@ class dff_array(design.design):
self.place_dff_array() self.place_dff_array()
self.add_layout_pins() self.add_layout_pins()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def add_modules(self): def add_modules(self):

View File

@ -55,6 +55,7 @@ class dff_buf(design.design):
self.place_instances() self.place_instances()
self.route_wires() self.route_wires()
self.add_layout_pins() self.add_layout_pins()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def add_modules(self): def add_modules(self):

View File

@ -49,6 +49,7 @@ class dff_buf_array(design.design):
self.height = self.rows * self.dff.height self.height = self.rows * self.dff.height
self.place_dff_array() self.place_dff_array()
self.add_layout_pins() self.add_layout_pins()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def add_pins(self): def add_pins(self):

View File

@ -53,6 +53,7 @@ class dff_inv(design.design):
self.add_wires() self.add_wires()
self.add_layout_pins() self.add_layout_pins()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def add_pins(self): def add_pins(self):

View File

@ -49,6 +49,7 @@ class dff_inv_array(design.design):
self.place_dff_array() self.place_dff_array()
self.add_layout_pins() self.add_layout_pins()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def add_modules(self): def add_modules(self):

View File

@ -54,6 +54,7 @@ class hierarchical_decoder(design.design):
self.route_predecode_rails() self.route_predecode_rails()
self.route_vdd_gnd() self.route_vdd_gnd()
self.offset_all_coordinates() self.offset_all_coordinates()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def add_modules(self): def add_modules(self):

View File

@ -47,6 +47,7 @@ class hierarchical_predecode2x4(hierarchical_predecode):
self.place_output_inverters() self.place_output_inverters()
self.place_nand_array() self.place_nand_array()
self.route() self.route()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def get_nand_input_line_combination(self): def get_nand_input_line_combination(self):

View File

@ -52,6 +52,7 @@ class hierarchical_predecode3x8(hierarchical_predecode):
self.place_output_inverters() self.place_output_inverters()
self.place_nand_array() self.place_nand_array()
self.route() self.route()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def get_nand_input_line_combination(self): def get_nand_input_line_combination(self):

View File

@ -51,6 +51,7 @@ class precharge_array(design.design):
self.place_insts() self.place_insts()
self.add_layout_pins() self.add_layout_pins()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def add_modules(self): def add_modules(self):

View File

@ -49,6 +49,7 @@ class replica_bitline(design.design):
self.width = self.replica_column_inst.rx() - self.delay_chain_inst.lx() + self.m2_pitch self.width = self.replica_column_inst.rx() - self.delay_chain_inst.lx() + self.m2_pitch
self.height = max(self.replica_column_inst.uy(), self.delay_chain_inst.uy()) + self.m3_pitch self.height = max(self.replica_column_inst.uy(), self.delay_chain_inst.uy()) + self.m3_pitch
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def add_pins(self): def add_pins(self):

View File

@ -50,6 +50,7 @@ class sense_amp_array(design.design):
self.place_sense_amp_array() self.place_sense_amp_array()
self.add_layout_pins() self.add_layout_pins()
self.route_rails() self.route_rails()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def add_pins(self): def add_pins(self):

View File

@ -52,6 +52,7 @@ class single_level_column_mux_array(design.design):
self.add_layout_pins() self.add_layout_pins()
self.add_enclosure(self.mux_inst, "pwell") self.add_enclosure(self.mux_inst, "pwell")
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def add_pins(self): def add_pins(self):

View File

@ -41,6 +41,7 @@ class tri_gate_array(design.design):
self.place_array() self.place_array()
self.add_layout_pins() self.add_layout_pins()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def add_modules(self): def add_modules(self):

View File

@ -44,6 +44,7 @@ class wordline_driver(design.design):
self.route_layout() self.route_layout()
self.route_vdd_gnd() self.route_vdd_gnd()
self.offset_all_coordinates() self.offset_all_coordinates()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def add_pins(self): def add_pins(self):

View File

@ -50,6 +50,7 @@ class write_driver_array(design.design):
self.place_write_array() self.place_write_array()
self.add_layout_pins() self.add_layout_pins()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def add_pins(self): def add_pins(self):

View File

@ -31,14 +31,15 @@ class pgate(design.design):
self.create_netlist() self.create_netlist()
if not OPTS.netlist_only: if not OPTS.netlist_only:
self.create_layout() self.create_layout()
self.add_boundary()
self.DRC_LVS() self.DRC_LVS()
def create_netlist(): def create_netlist(self):
""" Pure virtual function """ """ Pure virtual function """
debug.error("Must over-ride create_netlist.",-1) debug.error("Must over-ride create_netlist.",-1)
def create_layout(): def create_layout(self):
""" Pure virtual function """ """ Pure virtual function """
debug.error("Must over-ride create_layout.",-1) debug.error("Must over-ride create_layout.",-1)