mirror of https://github.com/VLSIDA/OpenRAM.git
Add layer to horizontal pin help and use in precharge
This commit is contained in:
parent
12a6f1f2ee
commit
7b77378927
|
|
@ -422,10 +422,12 @@ class layout():
|
||||||
for pin_name in self.pin_map.keys():
|
for pin_name in self.pin_map.keys():
|
||||||
self.copy_layout_pin(instance, pin_name, prefix + pin_name)
|
self.copy_layout_pin(instance, pin_name, prefix + pin_name)
|
||||||
|
|
||||||
def route_horizontal_pin(self, name):
|
def route_horizontal_pin(self, name, layer=None):
|
||||||
"""
|
"""
|
||||||
Route together all of the pins of a given name that horizontally align.
|
Route together all of the pins of a given name that horizontally align.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
bins = {}
|
bins = {}
|
||||||
|
|
||||||
for i in range(len(self.local_insts)):
|
for i in range(len(self.local_insts)):
|
||||||
|
|
@ -442,14 +444,24 @@ class layout():
|
||||||
|
|
||||||
last_via = None
|
last_via = None
|
||||||
for pin in v:
|
for pin in v:
|
||||||
|
if layer:
|
||||||
|
pin_layer = layer
|
||||||
|
else:
|
||||||
|
pin_layer = self.supply_stack[0]
|
||||||
last_via = self.add_via_stack_center(from_layer=pin.layer,
|
last_via = self.add_via_stack_center(from_layer=pin.layer,
|
||||||
to_layer=self.supply_stack[0],
|
to_layer=pin_layer,
|
||||||
offset=pin.center())
|
offset=pin.center())
|
||||||
|
|
||||||
|
if last_via:
|
||||||
|
via_height=last_via.mod.second_layer_height
|
||||||
|
else:
|
||||||
|
via_height=None
|
||||||
|
|
||||||
self.add_layout_pin_segment_center(text=name,
|
self.add_layout_pin_segment_center(text=name,
|
||||||
layer=self.supply_stack[0],
|
layer=pin_layer,
|
||||||
start=vector(left_x, y),
|
start=vector(left_x, y),
|
||||||
end=vector(right_x, y))
|
end=vector(right_x, y),
|
||||||
|
width=via_height)
|
||||||
|
|
||||||
def add_layout_pin_segment_center(self, text, layer, start, end, width=None):
|
def add_layout_pin_segment_center(self, text, layer, start, end, width=None):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -81,18 +81,20 @@ class precharge_array(design.design):
|
||||||
|
|
||||||
def add_layout_pins(self):
|
def add_layout_pins(self):
|
||||||
|
|
||||||
en_pin = self.pc_cell.get_pin("en_bar")
|
# en_pin = self.pc_cell.get_pin("en_bar")
|
||||||
start_offset = en_pin.lc().scale(0, 1)
|
# start_offset = en_pin.lc().scale(0, 1)
|
||||||
end_offset = start_offset + vector(self.width, 0)
|
# end_offset = start_offset + vector(self.width, 0)
|
||||||
self.add_layout_pin_segment_center(text="en_bar",
|
# self.add_layout_pin_segment_center(text="en_bar",
|
||||||
layer=self.en_bar_layer,
|
# layer=self.en_bar_layer,
|
||||||
start=start_offset,
|
# start=start_offset,
|
||||||
end=end_offset)
|
# end=end_offset)
|
||||||
|
|
||||||
for inst in self.local_insts:
|
# for inst in self.local_insts:
|
||||||
self.add_via_stack_center(from_layer=en_pin.layer,
|
# self.add_via_stack_center(from_layer=en_pin.layer,
|
||||||
to_layer=self.en_bar_layer,
|
# to_layer=self.en_bar_layer,
|
||||||
offset=inst.get_pin("en_bar").center())
|
# offset=inst.get_pin("en_bar").center())
|
||||||
|
|
||||||
|
self.route_horizontal_pin("en_bar", layer=self.en_bar_layer)
|
||||||
self.route_horizontal_pin("vdd")
|
self.route_horizontal_pin("vdd")
|
||||||
|
|
||||||
for i in range(len(self.local_insts)):
|
for i in range(len(self.local_insts)):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue