diff --git a/compiler/base/hierarchy_layout.py b/compiler/base/hierarchy_layout.py index d65fe17d..5adc163a 100644 --- a/compiler/base/hierarchy_layout.py +++ b/compiler/base/hierarchy_layout.py @@ -422,10 +422,12 @@ class layout(): for pin_name in self.pin_map.keys(): 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. """ + + bins = {} for i in range(len(self.local_insts)): @@ -442,14 +444,24 @@ class layout(): last_via = None 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, - to_layer=self.supply_stack[0], + to_layer=pin_layer, 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, - layer=self.supply_stack[0], + layer=pin_layer, 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): """ diff --git a/compiler/modules/precharge_array.py b/compiler/modules/precharge_array.py index 4de5259e..ff2801f5 100644 --- a/compiler/modules/precharge_array.py +++ b/compiler/modules/precharge_array.py @@ -81,18 +81,20 @@ class precharge_array(design.design): def add_layout_pins(self): - en_pin = self.pc_cell.get_pin("en_bar") - start_offset = en_pin.lc().scale(0, 1) - end_offset = start_offset + vector(self.width, 0) - self.add_layout_pin_segment_center(text="en_bar", - layer=self.en_bar_layer, - start=start_offset, - end=end_offset) +# en_pin = self.pc_cell.get_pin("en_bar") +# start_offset = en_pin.lc().scale(0, 1) +# end_offset = start_offset + vector(self.width, 0) +# self.add_layout_pin_segment_center(text="en_bar", +# layer=self.en_bar_layer, +# start=start_offset, +# end=end_offset) - for inst in self.local_insts: - self.add_via_stack_center(from_layer=en_pin.layer, - to_layer=self.en_bar_layer, - offset=inst.get_pin("en_bar").center()) +# for inst in self.local_insts: +# self.add_via_stack_center(from_layer=en_pin.layer, +# to_layer=self.en_bar_layer, +# offset=inst.get_pin("en_bar").center()) + + self.route_horizontal_pin("en_bar", layer=self.en_bar_layer) self.route_horizontal_pin("vdd") for i in range(len(self.local_insts)):