mirror of https://github.com/VLSIDA/OpenRAM.git
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:
parent
f7a2766c29
commit
7c254d540d
|
|
@ -708,7 +708,7 @@ class layout(lef.lef):
|
||||||
self.add_wire(layer_stack, [pin.center(), mid, trunk_mid])
|
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,
|
layer_stack=("metal1", "via1", "metal2"), pitch=None,
|
||||||
vertical=False):
|
vertical=False):
|
||||||
"""
|
"""
|
||||||
|
|
@ -722,20 +722,18 @@ class layout(lef.lef):
|
||||||
elif not pitch and not vertical:
|
elif not pitch and not vertical:
|
||||||
pitch = self.m1_pitch
|
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
|
# FIXME: Must extend this to a horizontal conflict graph too if we want to minimize the
|
||||||
# number of tracks!
|
# number of tracks!
|
||||||
|
#hcg = {}
|
||||||
|
|
||||||
# Initialize the vertical conflict graph (vcg) and make a list of all pins
|
# Initialize the vertical conflict graph (vcg) and make a list of all pins
|
||||||
vcg = {}
|
vcg = {}
|
||||||
all_pins = {}
|
|
||||||
for (top_name, bot_name) in route_map:
|
for (top_name, bot_name) in route_map:
|
||||||
vcg[top_name] = []
|
vcg[top_name] = []
|
||||||
vcg[bot_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
|
# Find the vertical pin conflicts
|
||||||
for (top_name, bot_name) in route_map:
|
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,
|
self.create_channel_route(route_map, left_inst, right_inst, offset,
|
||||||
layer_stack, pitch, vertical=True)
|
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"),
|
layer_stack=("metal1", "via1", "metal2"),
|
||||||
pitch=None):
|
pitch=None):
|
||||||
"""
|
"""
|
||||||
Wrapper to create a horizontal channel route
|
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)
|
layer_stack, pitch, vertical=False)
|
||||||
|
|
||||||
def add_enclosure(self, insts, layer="nwell"):
|
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)]
|
bank_names = ["bank_din[{}]".format(x) for x in range(self.word_size)]
|
||||||
|
|
||||||
route_map = list(zip(bank_names, dff_names))
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue