Add new power supplies to delay chain

This commit is contained in:
Matt Guthaus 2018-07-16 10:19:52 -07:00
parent f3ae29fe0b
commit 3bbb604504
2 changed files with 24 additions and 13 deletions

View File

@ -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

View File

@ -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")