mirror of https://github.com/VLSIDA/OpenRAM.git
Fixed offset jogs
This commit is contained in:
parent
e69b665689
commit
620604603c
|
|
@ -450,7 +450,7 @@ class layout():
|
|||
path=coordinates,
|
||||
layer_widths=layer_widths)
|
||||
|
||||
def add_zjog(self, layer, start, end, first_direction="H"):
|
||||
def add_zjog(self, layer, start, end, first_direction="H", fixed_offset=None):
|
||||
"""
|
||||
Add a simple jog at the halfway point.
|
||||
If layer is a single value, it is a path.
|
||||
|
|
@ -459,11 +459,17 @@ class layout():
|
|||
|
||||
# vertical first
|
||||
if first_direction == "V":
|
||||
mid1 = vector(start.x, 0.5 * start.y + 0.5 * end.y)
|
||||
if fixed_offset:
|
||||
mid1 = vector(start.x, fixed_offset)
|
||||
else:
|
||||
mid1 = vector(start.x, 0.5 * start.y + 0.5 * end.y)
|
||||
mid2 = vector(end.x, mid1.y)
|
||||
# horizontal first
|
||||
elif first_direction == "H":
|
||||
mid1 = vector(0.5 * start.x + 0.5 * end.x, start.y)
|
||||
if fixed_offset:
|
||||
mid1 = vector(fixed_offset, start.y)
|
||||
else:
|
||||
mid1 = vector(0.5 * start.x + 0.5 * end.x, start.y)
|
||||
mid2 = vector(mid1, end.y)
|
||||
else:
|
||||
debug.error("Invalid direction for jog -- must be H or V.")
|
||||
|
|
|
|||
Loading…
Reference in New Issue