mirror of https://github.com/VLSIDA/OpenRAM.git
Replace layout pins in the new signal escape router
This commit is contained in:
parent
87eca6b7db
commit
ba8e80d205
|
|
@ -227,7 +227,8 @@ class router(router_tech):
|
||||||
""" Add the route path to the layout. """
|
""" Add the route path to the layout. """
|
||||||
|
|
||||||
nodes = self.prepare_path(path)
|
nodes = self.prepare_path(path)
|
||||||
self.add_route(nodes)
|
shapes = self.add_route(nodes)
|
||||||
|
return shapes
|
||||||
|
|
||||||
|
|
||||||
def prepare_path(self, path):
|
def prepare_path(self, path):
|
||||||
|
|
@ -263,6 +264,7 @@ class router(router_tech):
|
||||||
working for this router.
|
working for this router.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
new_shapes = []
|
||||||
for i in range(0, len(nodes) - 1):
|
for i in range(0, len(nodes) - 1):
|
||||||
start = nodes[i].center
|
start = nodes[i].center
|
||||||
end = nodes[i + 1].center
|
end = nodes[i + 1].center
|
||||||
|
|
@ -276,10 +278,12 @@ class router(router_tech):
|
||||||
self.design.add_via_center(layers=self.layers,
|
self.design.add_via_center(layers=self.layers,
|
||||||
offset=offset)
|
offset=offset)
|
||||||
else: # Wire
|
else: # Wire
|
||||||
self.design.add_rect(layer=self.get_layer(start.z),
|
shape = self.design.add_rect(layer=self.get_layer(start.z),
|
||||||
offset=offset,
|
offset=offset,
|
||||||
width=abs(diff.x) + self.track_wire,
|
width=abs(diff.x) + self.track_wire,
|
||||||
height=abs(diff.y) + self.track_wire)
|
height=abs(diff.y) + self.track_wire)
|
||||||
|
new_shapes.append(shape)
|
||||||
|
return new_shapes
|
||||||
|
|
||||||
|
|
||||||
def write_debug_gds(self, gds_name, g=None, source=None, target=None):
|
def write_debug_gds(self, gds_name, g=None, source=None, target=None):
|
||||||
|
|
|
||||||
|
|
@ -79,12 +79,14 @@ class signal_escape_router(router):
|
||||||
debug.info(0, "Retry routing in larger routing region with scale {}".format(scale))
|
debug.info(0, "Retry routing in larger routing region with scale {}".format(scale))
|
||||||
continue
|
continue
|
||||||
# Create the path shapes on layout
|
# Create the path shapes on layout
|
||||||
self.add_path(path)
|
new_shapes = self.add_path(path)
|
||||||
|
self.new_pins[source.name] = new_shapes[0]
|
||||||
# Find the recently added shapes
|
# Find the recently added shapes
|
||||||
self.prepare_gds_reader()
|
self.prepare_gds_reader()
|
||||||
self.find_blockages(name)
|
self.find_blockages(name)
|
||||||
self.find_vias()
|
self.find_vias()
|
||||||
break
|
break
|
||||||
|
self.replace_layout_pins()
|
||||||
|
|
||||||
|
|
||||||
def add_perimeter_fake_pins(self):
|
def add_perimeter_fake_pins(self):
|
||||||
|
|
@ -152,3 +154,16 @@ class signal_escape_router(router):
|
||||||
fake = self.get_closest_perimeter_fake_pin(pin)
|
fake = self.get_closest_perimeter_fake_pin(pin)
|
||||||
to_route.append((pin, fake, pin.distance(fake)))
|
to_route.append((pin, fake, pin.distance(fake)))
|
||||||
return sorted(to_route, key=lambda x: x[2])
|
return sorted(to_route, key=lambda x: x[2])
|
||||||
|
|
||||||
|
|
||||||
|
def replace_layout_pins(self):
|
||||||
|
""" """
|
||||||
|
|
||||||
|
for name, pin in self.new_pins.items():
|
||||||
|
pin = graph_shape(pin.name, pin.boundary, pin.lpp)
|
||||||
|
# Find the intersection of this pin on the perimeter
|
||||||
|
for fake in self.fake_pins:
|
||||||
|
edge = pin.intersection(fake)
|
||||||
|
if edge:
|
||||||
|
break
|
||||||
|
self.design.replace_layout_pin(name, edge)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue