mirror of https://github.com/VLSIDA/OpenRAM.git
Set channel route height and width (of routes, not pins)
This commit is contained in:
parent
f87b427f76
commit
2ccf3aea3b
|
|
@ -213,11 +213,12 @@ class channel_route(design.design):
|
||||||
|
|
||||||
# Some of the pins may be to the left/below the channel offset,
|
# Some of the pins may be to the left/below the channel offset,
|
||||||
# so adjust if this is the case
|
# so adjust if this is the case
|
||||||
min_value = min([n.min_value for n in nets])
|
self.min_value = min([n.min_value for n in nets])
|
||||||
|
self.max_value = min([n.max_value for n in nets])
|
||||||
if self.vertical:
|
if self.vertical:
|
||||||
real_channel_offset = vector(self.offset.x, min(min_value, self.offset.y))
|
real_channel_offset = vector(self.offset.x, min(self.min_value, self.offset.y))
|
||||||
else:
|
else:
|
||||||
real_channel_offset = vector(min(min_value, self.offset.x), self.offset.y)
|
real_channel_offset = vector(min(self.min_value, self.offset.x), self.offset.y)
|
||||||
current_offset = real_channel_offset
|
current_offset = real_channel_offset
|
||||||
|
|
||||||
# Sort nets by left edge value
|
# Sort nets by left edge value
|
||||||
|
|
@ -278,13 +279,11 @@ class channel_route(design.design):
|
||||||
|
|
||||||
# Return the size of the channel
|
# Return the size of the channel
|
||||||
if self.vertical:
|
if self.vertical:
|
||||||
self.width = 0
|
self.width = current_offset.x + self.horizontal_nonpref_pitch - self.offset.x
|
||||||
self.height = current_offset.y
|
self.height = self.max_value + self.vertical_nonpref_pitch - self.offset.y
|
||||||
return current_offset.y + self.vertical_nonpref_pitch - self.offset.y
|
|
||||||
else:
|
else:
|
||||||
self.width = current_offset.x
|
self.width = self.max_value + self.horizontal_nonpref_pitch - self.offset.x
|
||||||
self.height = 0
|
self.height = current_offset.y + self.vertical_nonpref_pitch - self.offset.y
|
||||||
return current_offset.x + self.horizontal_nonpref_pitch - self.offset.x
|
|
||||||
|
|
||||||
def get_layer_pitch(self, layer):
|
def get_layer_pitch(self, layer):
|
||||||
""" Return the track pitch on a given layer """
|
""" Return the track pitch on a given layer """
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue