Merge branch 'supply_router' into dev

This commit is contained in:
mrg 2021-01-25 11:01:48 -08:00
commit bc8fd4a882
7 changed files with 22 additions and 11 deletions

View File

@ -57,6 +57,12 @@ class design(hierarchy_design):
self.cell_name,
GDS["unit"])
# Convert names back to the original names
# so that copying will use the new names
for pin_name in self.pin_map:
for index1, pin in enumerate(self.pin_map[pin_name]):
self.pin_map[pin_name][index1].name = self.get_original_pin_name(pin.name)
self.width = width
self.height = height

View File

@ -1235,7 +1235,6 @@ class layout():
self.add_power_pin(new_name, pin.center(), start_layer=start_layer)
def add_power_pin(self, name, loc, directions=None, start_layer="m1"):
# Hack for min area
if OPTS.tech_name == "sky130":
min_area = drc["minarea_{}".format(self.pwr_grid_layer)]

View File

@ -27,13 +27,13 @@ class pin_group:
# Flag for when it is enclosed
self.enclosed = False
# Remove any redundant pins (i.e. contained in other pins)
irredundant_pin_set = self.remove_redundant_shapes(list(pin_set))
# This is a list because we can have a pin
# group of disconnected sets of pins
# and these are represented by separate lists
self.pins = set(irredundant_pin_set)
self.pins = set(pin_set)
# Remove any redundant pins (i.e. contained in other pins)
self.remove_redundant_pins()
self.router = router
# These are the corresponding pin grids for each pin group.
@ -68,6 +68,10 @@ class pin_group:
total_string += ")"
return total_string
def add_pin(self, pin):
self.pins.add(pin)
self.remove_redundant_pins()
def __repr__(self):
""" override repr function output """
return str(self)
@ -81,6 +85,13 @@ class pin_group:
def is_routed(self):
return self.routed
def remove_redundant_pins(self):
"""
Remove redundant pin shapes
"""
new_pin_list = self.remove_redundant_shapes(list(self.pins))
self.pins = set(new_pin_list)
def remove_redundant_shapes(self, pin_list):
"""
Remove any pin layout that is contained within another.
@ -90,7 +101,6 @@ class pin_group:
if local_debug:
debug.info(0, "INITIAL: {}".format(pin_list))
# Make a copy of the list to start
new_pin_list = pin_list.copy()
remove_indices = set()

View File

@ -824,8 +824,7 @@ class router(router_tech):
group_map[gid] = pin_group(name=pin_name,
pin_set=[],
router=self)
# We always add it to the first set since they are touching
group_map[gid].pins.add(pin)
group_map[gid].add_pin(pin)
self.pin_groups[pin_name] = list(group_map.values())

View File

@ -23,7 +23,6 @@ class sram_1bank_2mux_1rw_1r_test(openram_test):
globals.init_openram(config_file)
from sram_config import sram_config
OPTS.route_supplies = False
OPTS.num_rw_ports = 1
OPTS.num_r_ports = 1
OPTS.num_w_ports = 0

View File

@ -23,7 +23,6 @@ class sram_1bank_2mux_global_test(openram_test):
globals.init_openram(config_file)
from sram_config import sram_config
OPTS.local_array_size = 8
OPTS.route_supplies = False
c = sram_config(word_size=8,
num_words=32,
num_banks=1)

View File

@ -33,7 +33,6 @@ class sram_1bank_2mux_func_test(openram_test):
from characterizer import functional
from sram_config import sram_config
OPTS.local_array_size = 8
OPTS.route_supplies = False
c = sram_config(word_size=8,
num_words=32,
num_banks=1)