mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-09-02 02:57:53 +02:00
Change channel route api to use pin maps instead of an insteads for cases where there are multiple instances that have the pins (e.g. decoders)
This commit is contained in:
@@ -708,7 +708,7 @@ class layout(lef.lef):
|
||||
self.add_wire(layer_stack, [pin.center(), mid, trunk_mid])
|
||||
|
||||
|
||||
def create_channel_route(self, route_map, bottom_inst, top_inst, offset,
|
||||
def create_channel_route(self, route_map, top_pins, bottom_pins, offset,
|
||||
layer_stack=("metal1", "via1", "metal2"), pitch=None,
|
||||
vertical=False):
|
||||
"""
|
||||
@@ -722,20 +722,18 @@ class layout(lef.lef):
|
||||
elif not pitch and not vertical:
|
||||
pitch = self.m1_pitch
|
||||
|
||||
# merge the two dictionaries to easily access all pins
|
||||
all_pins = {**top_pins, **bottom_pins}
|
||||
|
||||
# FIXME: Must extend this to a horizontal conflict graph too if we want to minimize the
|
||||
# number of tracks!
|
||||
#hcg = {}
|
||||
|
||||
# Initialize the vertical conflict graph (vcg) and make a list of all pins
|
||||
vcg = {}
|
||||
all_pins = {}
|
||||
for (top_name, bot_name) in route_map:
|
||||
vcg[top_name] = []
|
||||
vcg[bot_name] = []
|
||||
top_pin = top_inst.get_pin(top_name)
|
||||
bot_pin = bottom_inst.get_pin(bot_name)
|
||||
all_pins[top_name]=top_pin
|
||||
all_pins[bot_name]=bot_pin
|
||||
|
||||
|
||||
# Find the vertical pin conflicts
|
||||
for (top_name, bot_name) in route_map:
|
||||
@@ -802,13 +800,13 @@ class layout(lef.lef):
|
||||
self.create_channel_route(route_map, left_inst, right_inst, offset,
|
||||
layer_stack, pitch, vertical=True)
|
||||
|
||||
def create_horizontal_channel_route(self, route_map, top_inst, bottom_inst, offset,
|
||||
def create_horizontal_channel_route(self, route_map, top_pins, bottom_pins, offset,
|
||||
layer_stack=("metal1", "via1", "metal2"),
|
||||
pitch=None):
|
||||
"""
|
||||
Wrapper to create a horizontal channel route
|
||||
"""
|
||||
self.create_channel_route(route_map, top_inst, bottom_inst, offset,
|
||||
self.create_channel_route(route_map, top_pins, bottom_pins, offset,
|
||||
layer_stack, pitch, vertical=False)
|
||||
|
||||
def add_enclosure(self, insts, layer="nwell"):
|
||||
|
||||
@@ -181,7 +181,9 @@ class sram_1bank(sram_base):
|
||||
bank_names = ["bank_din[{}]".format(x) for x in range(self.word_size)]
|
||||
|
||||
route_map = list(zip(bank_names, dff_names))
|
||||
self.create_horizontal_channel_route(route_map, self.data_dff_inst, self.bank_inst, offset)
|
||||
dff_pins = {key: self.data_dff_inst.get_pin(key) for key in dff_names }
|
||||
bank_pins = {key: self.bank_inst.get_pin(key) for key in bank_names }
|
||||
self.create_horizontal_channel_route(route_map, dff_pins, bank_pins, offset)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user