From 3bbb60450412c59d5cb8bdb95fc093847749615c Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Mon, 16 Jul 2018 10:19:52 -0700 Subject: [PATCH] Add new power supplies to delay chain --- compiler/base/hierarchy_layout.py | 13 +++++++++++++ compiler/modules/delay_chain.py | 24 +++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/compiler/base/hierarchy_layout.py b/compiler/base/hierarchy_layout.py index 60519bdf..a398efe6 100644 --- a/compiler/base/hierarchy_layout.py +++ b/compiler/base/hierarchy_layout.py @@ -601,6 +601,19 @@ class layout(lef.lef): width=xmax-xmin, height=ymax-ymin) + def add_power_pin(self, name, loc): + """ + Add a single power pin from M3 own to M1 + """ + self.add_via_center(layers=("metal1", "via1", "metal2"), + offset=loc, + rotate=90) + self.add_via_center(layers=("metal2", "via2", "metal3"), + offset=loc) + self.add_layout_pin_rect_center(text=name, + layer="metal3", + offset=loc) + def add_power_ring(self, bbox): """ Create vdd and gnd power rings around an area of the bounding box argument. Must diff --git a/compiler/modules/delay_chain.py b/compiler/modules/delay_chain.py index 4b3dc150..04275eb7 100644 --- a/compiler/modules/delay_chain.py +++ b/compiler/modules/delay_chain.py @@ -164,19 +164,17 @@ class delay_chain(design.design): """ Add vdd and gnd rails and the input/output. Connect the gnd rails internally on the top end with no input/output to obstruct. """ - for driver in self.driver_inst_list: - vdd_pin = driver.get_pin("vdd") - self.add_layout_pin(text="vdd", - layer="metal1", - offset=vdd_pin.ll(), - width=self.width, - height=vdd_pin.height()) - gnd_pin = driver.get_pin("gnd") - self.add_layout_pin(text="gnd", - layer="metal1", - offset=gnd_pin.ll(), - width=self.width, - height=gnd_pin.height()) + for pin_name in ["vdd", "gnd"]: + for driver in self.driver_inst_list: + pin = driver.get_pin(pin_name) + start = pin.lc() + end = start + vector(self.width,0) + self.add_power_pin(pin_name, start) + self.add_power_pin(pin_name, end) + self.add_rect(layer="metal1", + offset=pin.ll(), + width=self.width, + height=pin.height()) # input is A pin of first inverter a_pin = self.driver_inst_list[0].get_pin("A")