Merge branch 'dev' into laptop_checkpoint

This commit is contained in:
Jesse Cirimelli-Low 2021-06-09 18:25:45 -07:00
commit 247a388ab5
11 changed files with 52 additions and 38 deletions

View File

@ -1413,7 +1413,7 @@ class layout():
[ll, ur] = bbox [ll, ur] = bbox
# Possibly inflate the bbox # Possibly inflate the bbox
nwell_offset = vector(self.nwell_width, self.nwell_width) nwell_offset = vector(2 * self.nwell_width, 2 * self.nwell_width)
ll -= nwell_offset.scale(inflate, inflate) ll -= nwell_offset.scale(inflate, inflate)
ur += nwell_offset.scale(inflate, inflate) ur += nwell_offset.scale(inflate, inflate)
@ -1452,7 +1452,7 @@ class layout():
to_layer="m1", to_layer="m1",
offset=loc) offset=loc)
else: else:
self.add_power_pin(name="gnd", self.add_power_pin(name="vdd",
loc=loc, loc=loc,
start_layer="li") start_layer="li")
count += 1 count += 1
@ -1472,7 +1472,7 @@ class layout():
to_layer="m1", to_layer="m1",
offset=loc) offset=loc)
else: else:
self.add_power_pin(name="gnd", self.add_power_pin(name="vdd",
loc=loc, loc=loc,
start_layer="li") start_layer="li")
count += 1 count += 1
@ -1492,7 +1492,7 @@ class layout():
to_layer="m2", to_layer="m2",
offset=loc) offset=loc)
else: else:
self.add_power_pin(name="gnd", self.add_power_pin(name="vdd",
loc=loc, loc=loc,
start_layer="li") start_layer="li")
count += 1 count += 1
@ -1512,7 +1512,7 @@ class layout():
to_layer="m2", to_layer="m2",
offset=loc) offset=loc)
else: else:
self.add_power_pin(name="gnd", self.add_power_pin(name="vdd",
loc=loc, loc=loc,
start_layer="li") start_layer="li")
count += 1 count += 1

View File

@ -24,7 +24,7 @@ debug.info(1, "Initializing characterizer...")
OPTS.spice_exe = "" OPTS.spice_exe = ""
if not OPTS.analytical_delay: if not OPTS.analytical_delay:
if OPTS.spice_name != "": if OPTS.spice_name:
# Capitalize Xyce # Capitalize Xyce
if OPTS.spice_name == "xyce": if OPTS.spice_name == "xyce":
OPTS.spice_name = "Xyce" OPTS.spice_name = "Xyce"
@ -45,7 +45,7 @@ if not OPTS.analytical_delay:
if OPTS.spice_name == "ngspice": if OPTS.spice_name == "ngspice":
os.environ["NGSPICE_INPUT_DIR"] = "{0}".format(OPTS.openram_temp) os.environ["NGSPICE_INPUT_DIR"] = "{0}".format(OPTS.openram_temp)
if OPTS.spice_exe == "": if not OPTS.spice_exe:
debug.error("No recognizable spice version found. Unable to perform characterization.", 1) debug.error("No recognizable spice version found. Unable to perform characterization.", 1)
else: else:
debug.info(1, "Finding spice simulator: {} ({})".format(OPTS.spice_name, OPTS.spice_exe)) debug.info(1, "Finding spice simulator: {} ({})".format(OPTS.spice_name, OPTS.spice_exe))

View File

@ -276,8 +276,8 @@ class stimuli():
self.sf.write(".OPTIONS MEASURE MEASFAIL=1\n") self.sf.write(".OPTIONS MEASURE MEASFAIL=1\n")
self.sf.write(".OPTIONS LINSOL type=klu\n") self.sf.write(".OPTIONS LINSOL type=klu\n")
self.sf.write(".TRAN {0}p {1}n\n".format(timestep, end_time)) self.sf.write(".TRAN {0}p {1}n\n".format(timestep, end_time))
else: elif OPTS.spice_name:
debug.error("Unkown spice simulator {}".format(OPTS.spice_name)) debug.error("Unkown spice simulator {}".format(OPTS.spice_name), -1)
# create plots for all signals # create plots for all signals
if not OPTS.use_pex: # Don't save all for extracted simulations if not OPTS.use_pex: # Don't save all for extracted simulations

View File

@ -109,7 +109,7 @@ class dff_buf(design.design):
except AttributeError: except AttributeError:
pass pass
well_spacing += self.well_extend_active well_spacing += 2 * self.well_extend_active
self.inv1_inst.place(vector(self.dff_inst.rx() + well_spacing, 0)) self.inv1_inst.place(vector(self.dff_inst.rx() + well_spacing, 0))

View File

@ -122,13 +122,13 @@ class options(optparse.Values):
# Tool options # Tool options
################### ###################
# Variable to select the variant of spice # Variable to select the variant of spice
spice_name = "" spice_name = None
# The spice executable being used which is derived from the user PATH. # The spice executable being used which is derived from the user PATH.
spice_exe = "" spice_exe = None
# Variable to select the variant of drc, lvs, pex # Variable to select the variant of drc, lvs, pex
drc_name = "" drc_name = None
lvs_name = "" lvs_name = None
pex_name = "" pex_name = None
# The DRC/LVS/PEX executable being used # The DRC/LVS/PEX executable being used
# which is derived from the user PATH. # which is derived from the user PATH.
drc_exe = None drc_exe = None

View File

@ -881,7 +881,7 @@ class router(router_tech):
""" """
pg = pin_group(name, [], self) pg = pin_group(name, [], self)
# Offset two spaces inside and one between the rings # Offset two spaces inside and one between the rings
if name == "vdd": if name == "gnd":
offset = width + 2 * space offset = width + 2 * space
else: else:
offset = space offset = space
@ -911,7 +911,7 @@ class router(router_tech):
pg = pin_group(name, [], self) pg = pin_group(name, [], self)
# Offset two spaces inside and one between the rings # Offset two spaces inside and one between the rings
# Units are in routing grids # Units are in routing grids
if name == "vdd": if name == "gnd":
offset = width + 2 * space offset = width + 2 * space
else: else:
offset = space offset = space

View File

@ -385,6 +385,7 @@ class sram_1bank(sram_base):
if len(route_map) > 0: if len(route_map) > 0:
# This layer stack must be different than the data dff layer stack
layer_stack = self.m1_stack layer_stack = self.m1_stack
if port == 0: if port == 0:
@ -394,11 +395,11 @@ class sram_1bank(sram_base):
offset=offset, offset=offset,
layer_stack=layer_stack, layer_stack=layer_stack,
parent=self) parent=self)
# This causes problem in magic since it sometimes cannot extract connectivity of isntances # This causes problem in magic since it sometimes cannot extract connectivity of instances
# with no active devices. # with no active devices.
self.add_inst(cr.name, cr) self.add_inst(cr.name, cr)
self.connect_inst([]) self.connect_inst([])
#self.add_flat_inst(cr.name, cr) # self.add_flat_inst(cr.name, cr)
else: else:
offset = vector(0, offset = vector(0,
self.bank.height + self.m3_pitch) self.bank.height + self.m3_pitch)
@ -406,11 +407,11 @@ class sram_1bank(sram_base):
offset=offset, offset=offset,
layer_stack=layer_stack, layer_stack=layer_stack,
parent=self) parent=self)
# This causes problem in magic since it sometimes cannot extract connectivity of isntances # This causes problem in magic since it sometimes cannot extract connectivity of instances
# with no active devices. # with no active devices.
self.add_inst(cr.name, cr) self.add_inst(cr.name, cr)
self.connect_inst([]) self.connect_inst([])
#self.add_flat_inst(cr.name, cr) # self.add_flat_inst(cr.name, cr)
def route_data_dffs(self, port, add_routes): def route_data_dffs(self, port, add_routes):
route_map = [] route_map = []
@ -441,40 +442,49 @@ class sram_1bank(sram_base):
if len(route_map) > 0: if len(route_map) > 0:
# The write masks will have blockages on M1 # This layer stack must be different than the column addr dff layer stack
# if self.num_wmasks > 0 and port in self.write_ports:
# layer_stack = self.m3_stack
# else:
# layer_stack = self.m1_stack
layer_stack = self.m3_stack layer_stack = self.m3_stack
if port == 0: if port == 0:
# This is relative to the bank at 0,0 or the s_en which is routed on M3 also
if "s_en" in self.control_logic_insts[port].mod.pin_map:
y_bottom = min(0, self.control_logic_insts[port].get_pin("s_en").by())
else:
y_bottom = 0
y_offset = y_bottom - self.data_bus_size[port] + 2 * self.m3_pitch
offset = vector(self.control_logic_insts[port].rx() + self.dff.width, offset = vector(self.control_logic_insts[port].rx() + self.dff.width,
- self.data_bus_size[port] + 2 * self.m3_pitch) y_offset)
cr = channel_route(netlist=route_map, cr = channel_route(netlist=route_map,
offset=offset, offset=offset,
layer_stack=layer_stack, layer_stack=layer_stack,
parent=self) parent=self)
if add_routes: if add_routes:
# This causes problem in magic since it sometimes cannot extract connectivity of isntances # This causes problem in magic since it sometimes cannot extract connectivity of instances
# with no active devices. # with no active devices.
self.add_inst(cr.name, cr) self.add_inst(cr.name, cr)
self.connect_inst([]) self.connect_inst([])
#self.add_flat_inst(cr.name, cr) # self.add_flat_inst(cr.name, cr)
else: else:
self.data_bus_size[port] = max(cr.height, self.col_addr_bus_size[port]) + self.data_bus_gap self.data_bus_size[port] = max(cr.height, self.col_addr_bus_size[port]) + self.data_bus_gap
else: else:
if "s_en" in self.control_logic_insts[port].mod.pin_map:
y_top = max(self.bank.height, self.control_logic_insts[port].get_pin("s_en").uy())
else:
y_top = self.bank.height
y_offset = y_top + self.m3_pitch
offset = vector(0, offset = vector(0,
self.bank.height + self.m3_pitch) y_offset)
cr = channel_route(netlist=route_map, cr = channel_route(netlist=route_map,
offset=offset, offset=offset,
layer_stack=layer_stack, layer_stack=layer_stack,
parent=self) parent=self)
if add_routes: if add_routes:
# This causes problem in magic since it sometimes cannot extract connectivity of isntances # This causes problem in magic since it sometimes cannot extract connectivity of instances
# with no active devices. # with no active devices.
self.add_inst(cr.name, cr) self.add_inst(cr.name, cr)
self.connect_inst([]) self.connect_inst([])
#self.add_flat_inst(cr.name, cr) # self.add_flat_inst(cr.name, cr)
else: else:
self.data_bus_size[port] = max(cr.height, self.col_addr_bus_size[port]) + self.data_bus_gap self.data_bus_size[port] = max(cr.height, self.col_addr_bus_size[port]) + self.data_bus_gap

View File

@ -45,8 +45,8 @@ class timing_setup_test(openram_test):
'setup_times_HL': [0.16357419999999998], 'setup_times_HL': [0.16357419999999998],
'setup_times_LH': [0.1757812]} 'setup_times_LH': [0.1757812]}
elif OPTS.tech_name == "sky130": elif OPTS.tech_name == "sky130":
golden_data = {'hold_times_HL': [-0.05615234], golden_data = {'hold_times_HL': [-0.03173828],
'hold_times_LH': [-0.03173828], 'hold_times_LH': [-0.05615234],
'setup_times_HL': [0.078125], 'setup_times_HL': [0.078125],
'setup_times_LH': [0.1025391]} 'setup_times_LH': [0.1025391]}
else: else:

View File

@ -45,8 +45,8 @@ class timing_setup_test(openram_test):
'setup_times_HL': [0.1757812], 'setup_times_HL': [0.1757812],
'setup_times_LH': [0.1879883]} 'setup_times_LH': [0.1879883]}
elif OPTS.tech_name == "sky130": elif OPTS.tech_name == "sky130":
golden_data = {'hold_times_HL': [-0.05615234], golden_data = {'hold_times_HL': [-0.03173828],
'hold_times_LH': [-0.03173828], 'hold_times_LH': [-0.05615234],
'setup_times_HL': [0.078125], 'setup_times_HL': [0.078125],
'setup_times_LH': [0.1025391]} 'setup_times_LH': [0.1025391]}
else: else:

View File

@ -45,8 +45,8 @@ class timing_setup_test(openram_test):
'setup_times_HL': [0.16357419999999998], 'setup_times_HL': [0.16357419999999998],
'setup_times_LH': [0.1757812]} 'setup_times_LH': [0.1757812]}
elif OPTS.tech_name == "sky130": elif OPTS.tech_name == "sky130":
golden_data = {'hold_times_HL': [-0.05615234], golden_data = {'hold_times_HL': [-0.03173828],
'hold_times_LH': [-0.03173828], 'hold_times_LH': [-0.05615234],
'setup_times_HL': [0.078125], 'setup_times_HL': [0.078125],
'setup_times_LH': [0.1025391]} 'setup_times_LH': [0.1025391]}
else: else:

View File

@ -180,6 +180,10 @@ def write_drc_script(cell_name, gds_name, extract, final_verification, output_pa
f.write('puts "Finished drc check"\n') f.write('puts "Finished drc check"\n')
f.write("drc catchup\n") f.write("drc catchup\n")
f.write('puts "Finished drc catchup"\n') f.write('puts "Finished drc catchup"\n')
# This is needed instead of drc count total because it displays
# some errors that are not "DRC" errors.
# f.write("puts -nonewline \"Total DRC errors found: \"\n")
# f.write("puts stdout [drc listall count total]\n")
f.write("drc count total\n") f.write("drc count total\n")
f.write("quit -noprompt\n") f.write("quit -noprompt\n")
f.write("EOF\n") f.write("EOF\n")