mirror of https://github.com/VLSIDA/OpenRAM.git
make channel router better
This commit is contained in:
parent
691f7a989e
commit
48a7065b31
|
|
@ -12,7 +12,7 @@ from openram import debug
|
||||||
from openram.tech import drc
|
from openram.tech import drc
|
||||||
from .vector import vector
|
from .vector import vector
|
||||||
from .design import design
|
from .design import design
|
||||||
|
from openram import OPTS
|
||||||
|
|
||||||
class channel_net():
|
class channel_net():
|
||||||
def __init__(self, net_name, pins, vertical):
|
def __init__(self, net_name, pins, vertical):
|
||||||
|
|
@ -326,12 +326,23 @@ class channel_route(design):
|
||||||
max_x = max([pin.center().x for pin in pins])
|
max_x = max([pin.center().x for pin in pins])
|
||||||
min_x = min([pin.center().x for pin in pins])
|
min_x = min([pin.center().x for pin in pins])
|
||||||
min_y = min([pin.center().y for pin in pins])
|
min_y = min([pin.center().y for pin in pins])
|
||||||
|
max_y = max([pin.center().y for pin in pins])
|
||||||
# see the channel is at top or bottom
|
# see the channel is at top or bottom
|
||||||
if min_y < 0: # port0, min_x need to change
|
if min_y < 0: # port0
|
||||||
|
for pin in pins:
|
||||||
|
if pin.center().x == max_x:
|
||||||
|
if pin.center().y == max_y:
|
||||||
min_x = min_x - 0.1 # in order to add jog at the dff pins, avoid overlap with vdd pins, left shift vertical line at dout pin
|
min_x = min_x - 0.1 # in order to add jog at the dff pins, avoid overlap with vdd pins, left shift vertical line at dout pin
|
||||||
|
else: # pin has max_x is under track
|
||||||
|
max_x = max_x - 0.1
|
||||||
port = 0
|
port = 0
|
||||||
else: # port1, max_x need to change
|
else: # port1
|
||||||
|
for pin in pins:
|
||||||
|
if pin.center().x == max_x:
|
||||||
|
if pin.center().y == max_y:
|
||||||
max_x = max_x - 0.1 # in order to add jog at the dff pins, avoid overlap with vdd pins, left shift vertical line at dout pin
|
max_x = max_x - 0.1 # in order to add jog at the dff pins, avoid overlap with vdd pins, left shift vertical line at dout pin
|
||||||
|
else: # pin has max_x is under track
|
||||||
|
min_x = min_x - 0.1
|
||||||
port = 1
|
port = 1
|
||||||
# if we are less than a pitch, just create a non-preferred layer jog
|
# if we are less than a pitch, just create a non-preferred layer jog
|
||||||
non_preferred_route = max_x - min_x <= pitch
|
non_preferred_route = max_x - min_x <= pitch
|
||||||
|
|
@ -368,6 +379,8 @@ class channel_route(design):
|
||||||
|
|
||||||
# Route each pin to the trunk
|
# Route each pin to the trunk
|
||||||
for pin in pins:
|
for pin in pins:
|
||||||
|
debug.warning("pin name in net ----> {0}".format(pin.name))
|
||||||
|
debug.warning("wmask or not --> {0}".format(OPTS.write_size))
|
||||||
# Find the correct side of the pin
|
# Find the correct side of the pin
|
||||||
if pin.cy() < trunk_offset.y:
|
if pin.cy() < trunk_offset.y:
|
||||||
pin_pos = pin.center()
|
pin_pos = pin.center()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue