mirror of https://github.com/VLSIDA/OpenRAM.git
Continue routing rails in same layer after a blockage
This commit is contained in:
parent
a711a5823d
commit
7e2bef624e
|
|
@ -331,11 +331,12 @@ class supply_router(router):
|
||||||
# While we can keep expanding east in this horizontal track
|
# While we can keep expanding east in this horizontal track
|
||||||
while wave and wave[0].x < self.max_xoffset:
|
while wave and wave[0].x < self.max_xoffset:
|
||||||
added_rail = self.find_supply_rail(name, wave, direction.EAST)
|
added_rail = self.find_supply_rail(name, wave, direction.EAST)
|
||||||
if added_rail:
|
if not added_rail:
|
||||||
wave = added_rail.neighbor(direction.EAST)
|
# Just seed with the next one
|
||||||
|
wave = [x+vector3d(1,0,0) for x in wave]
|
||||||
else:
|
else:
|
||||||
wave = None
|
# Seed with the neighbor of the end of the last rail
|
||||||
|
wave = added_rail.neighbor(direction.EAST)
|
||||||
|
|
||||||
# Vertical supply rails
|
# Vertical supply rails
|
||||||
max_offset = self.rg.ur.x
|
max_offset = self.rg.ur.x
|
||||||
|
|
@ -345,10 +346,12 @@ class supply_router(router):
|
||||||
# While we can keep expanding north in this vertical track
|
# While we can keep expanding north in this vertical track
|
||||||
while wave and wave[0].y < self.max_yoffset:
|
while wave and wave[0].y < self.max_yoffset:
|
||||||
added_rail = self.find_supply_rail(name, wave, direction.NORTH)
|
added_rail = self.find_supply_rail(name, wave, direction.NORTH)
|
||||||
if added_rail:
|
if not added_rail:
|
||||||
wave = added_rail.neighbor(direction.NORTH)
|
# Just seed with the next one
|
||||||
|
wave = [x+vector3d(0,1,0) for x in wave]
|
||||||
else:
|
else:
|
||||||
wave = None
|
# Seed with the neighbor of the end of the last rail
|
||||||
|
wave = added_rail.neighbor(direction.NORTH)
|
||||||
|
|
||||||
def find_supply_rail(self, name, seed_wave, direct):
|
def find_supply_rail(self, name, seed_wave, direct):
|
||||||
"""
|
"""
|
||||||
|
|
@ -356,15 +359,18 @@ class supply_router(router):
|
||||||
to contain a via, and, if so, add it.
|
to contain a via, and, if so, add it.
|
||||||
"""
|
"""
|
||||||
start_wave = self.find_supply_rail_start(name, seed_wave, direct)
|
start_wave = self.find_supply_rail_start(name, seed_wave, direct)
|
||||||
|
|
||||||
|
# This means there were no more unblocked grids in the row/col
|
||||||
if not start_wave:
|
if not start_wave:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
wave_path = self.probe_supply_rail(name, start_wave, direct)
|
wave_path = self.probe_supply_rail(name, start_wave, direct)
|
||||||
|
|
||||||
if self.approve_supply_rail(name, wave_path):
|
self.approve_supply_rail(name, wave_path)
|
||||||
return wave_path
|
|
||||||
else:
|
# Return the rail whether we approved it or not,
|
||||||
return None
|
# as it will be used to find the next start location
|
||||||
|
return wave_path
|
||||||
|
|
||||||
def find_supply_rail_start(self, name, seed_wave, direct):
|
def find_supply_rail_start(self, name, seed_wave, direct):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue