mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-09-07 11:21:14 +02:00
merge conflict 2 - port data
This commit is contained in:
@@ -57,21 +57,15 @@ class hierarchical_decoder(design.design):
|
||||
self.DRC_LVS()
|
||||
|
||||
def add_modules(self):
|
||||
if OPTS.tech_name == "s8":
|
||||
self.and2 = factory.create(module_type="pand2_dec")
|
||||
else:
|
||||
self.and2 = factory.create(module_type="pand2_dec",
|
||||
height=self.cell_height)
|
||||
self.and2 = factory.create(module_type="and2_dec",
|
||||
height=self.cell_height)
|
||||
self.add_mod(self.and2)
|
||||
if OPTS.tech_name == "s8":
|
||||
self.and3 = factory.create(module_type="pand3_dec")
|
||||
else:
|
||||
self.and3 = factory.create(module_type="pand3_dec",
|
||||
height=self.cell_height)
|
||||
|
||||
|
||||
self.and3 = factory.create(module_type="and3_dec",
|
||||
height=self.cell_height)
|
||||
self.add_mod(self.and3)
|
||||
# TBD
|
||||
# self.and4 = factory.create(module_type="pand4_dec")
|
||||
# self.and4 = factory.create(module_type="and4_dec")
|
||||
# self.add_mod(self.and4)
|
||||
|
||||
self.add_decoders()
|
||||
@@ -180,6 +174,7 @@ class hierarchical_decoder(design.design):
|
||||
# Two extra pitches between modules on left and right
|
||||
self.internal_routing_width = self.total_number_of_predecoder_outputs * self.bus_pitch + self.bus_pitch
|
||||
self.row_decoder_height = self.and2.height * self.num_outputs
|
||||
|
||||
# Extra bus space for supply contacts
|
||||
self.input_routing_width = self.num_inputs * self.bus_pitch + self.bus_space
|
||||
|
||||
|
||||
@@ -42,13 +42,13 @@ class hierarchical_predecode(design.design):
|
||||
|
||||
# FIXME: Default parms are required for hard cells for now.
|
||||
if self.number_of_inputs == 2:
|
||||
self.and_mod = factory.create(module_type="pand2_dec",
|
||||
self.and_mod = factory.create(module_type="and2_dec",
|
||||
height=self.cell_height)
|
||||
elif self.number_of_inputs == 3:
|
||||
self.and_mod = factory.create(module_type="pand3_dec",
|
||||
self.and_mod = factory.create(module_type="and3_dec",
|
||||
height=self.cell_height)
|
||||
elif self.number_of_inputs == 4:
|
||||
self.and_mod = factory.create(module_type="pand4_dec",
|
||||
self.and_mod = factory.create(module_type="and4_dec",
|
||||
height=self.cell_height)
|
||||
else:
|
||||
debug.error("Invalid number of predecode inputs: {}".format(self.number_of_inputs), -1)
|
||||
|
||||
@@ -534,6 +534,8 @@ class port_data(design.design):
|
||||
else:
|
||||
start_bit=0
|
||||
|
||||
# This could be a channel route, but in some techs the bitlines
|
||||
# are too close together.
|
||||
self.channel_route_bitlines(inst1=inst1,
|
||||
inst1_bls_template=inst1_bls_templ,
|
||||
inst2=inst2,
|
||||
@@ -558,6 +560,8 @@ class port_data(design.design):
|
||||
else:
|
||||
start_bit=0
|
||||
|
||||
# This could be a channel route, but in some techs the bitlines
|
||||
# are too close together.
|
||||
self.channel_route_bitlines(inst1=inst1, inst2=inst2,
|
||||
num_bits=self.word_size,
|
||||
inst1_bls_template=inst1_bls_templ,
|
||||
@@ -569,11 +573,11 @@ class port_data(design.design):
|
||||
inst1 = self.write_driver_array_inst
|
||||
inst2 = self.sense_amp_array_inst
|
||||
|
||||
# These should be pitch matched in the cell library,
|
||||
# but just in case, do a channel route.
|
||||
self.channel_route_bitlines(inst1=inst1,
|
||||
inst2=inst2,
|
||||
num_bits=self.word_size)
|
||||
# This could be a channel route, but in some techs the bitlines
|
||||
# are too close together.
|
||||
self.connect_bitlines(inst1=inst1,
|
||||
inst2=inst2,
|
||||
num_bits=self.word_size)
|
||||
|
||||
def route_bitline_pins(self):
|
||||
""" Add the bitline pins for the given port """
|
||||
@@ -676,10 +680,9 @@ class port_data(design.design):
|
||||
Route the bl and br of two modules using the channel router.
|
||||
"""
|
||||
|
||||
bot_inst_group, top_inst_group = self._group_bitline_instances(
|
||||
inst1, inst2, num_bits,
|
||||
inst1_bls_template, inst1_start_bit,
|
||||
inst2_bls_template, inst2_start_bit)
|
||||
bot_inst_group, top_inst_group = self._group_bitline_instances(inst1, inst2, num_bits,
|
||||
inst1_bls_template, inst1_start_bit,
|
||||
inst2_bls_template, inst2_start_bit)
|
||||
|
||||
# Channel route each mux separately since we don't minimize the number
|
||||
# of tracks in teh channel router yet. If we did, we could route all the bits at once!
|
||||
@@ -688,13 +691,8 @@ class port_data(design.design):
|
||||
bottom_names = self._get_bitline_pins(bot_inst_group, bit)
|
||||
top_names = self._get_bitline_pins(top_inst_group, bit)
|
||||
|
||||
if bottom_names[0].layer == "m2":
|
||||
bitline_dirs = ("H", "V")
|
||||
elif bottom_names[0].layer == "m1":
|
||||
bitline_dirs = ("V", "H")
|
||||
|
||||
route_map = list(zip(bottom_names, top_names))
|
||||
self.create_horizontal_channel_route(route_map, offset, self.m1_stack, bitline_dirs)
|
||||
self.create_horizontal_channel_route(route_map, offset, self.m1_stack)
|
||||
|
||||
def connect_bitlines(self, inst1, inst2, num_bits,
|
||||
inst1_bls_template="{inst}_{bit}",
|
||||
@@ -707,10 +705,9 @@ class port_data(design.design):
|
||||
in the middle between the two modules (if needed).
|
||||
"""
|
||||
|
||||
bot_inst_group, top_inst_group = self._group_bitline_instances(
|
||||
inst1, inst2, num_bits,
|
||||
inst1_bls_template, inst1_start_bit,
|
||||
inst2_bls_template, inst2_start_bit)
|
||||
bot_inst_group, top_inst_group = self._group_bitline_instances(inst1, inst2, num_bits,
|
||||
inst1_bls_template, inst1_start_bit,
|
||||
inst2_bls_template, inst2_start_bit)
|
||||
|
||||
for col in range(num_bits):
|
||||
bot_bl_pin, bot_br_pin = self._get_bitline_pins(bot_inst_group, col)
|
||||
@@ -718,15 +715,9 @@ class port_data(design.design):
|
||||
bot_bl, bot_br = bot_bl_pin.uc(), bot_br_pin.uc()
|
||||
top_bl, top_br = top_bl_pin.bc(), top_br_pin.bc()
|
||||
|
||||
yoffset = 0.5 * (top_bl.y + bot_bl.y)
|
||||
self.add_path("m2", [bot_bl,
|
||||
vector(bot_bl.x, yoffset),
|
||||
vector(top_bl.x, yoffset),
|
||||
top_bl])
|
||||
self.add_path("m2", [bot_br,
|
||||
vector(bot_br.x, yoffset),
|
||||
vector(top_br.x, yoffset),
|
||||
top_br])
|
||||
layer_pitch = getattr(self, "{}_pitch".format(top_bl_pin.layer))
|
||||
self.add_zjog(bot_bl_pin.layer, bot_bl, top_bl, "V", top_bl_pin.by() - layer_pitch)
|
||||
self.add_zjog(bot_br_pin.layer, bot_br, top_br, "V", top_bl_pin.by() - 2 * layer_pitch)
|
||||
|
||||
def graph_exclude_precharge(self):
|
||||
"""Precharge adds a loop between bitlines, can be excluded to reduce complexity"""
|
||||
|
||||
Reference in New Issue
Block a user