Skip to content

Commit

Permalink
Working lopsided with hacks still
Browse files Browse the repository at this point in the history
  • Loading branch information
mcoduoza committed Dec 7, 2024
1 parent c0299ea commit e451974
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions canal/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ def compute_num_tracks(x_offset: int, y_offset: int,


def get_array_size(width, height, io_sides):
# MO Hack
x_min = 0
#x_min = 1 if IOSide.West in io_sides else 0
x_min = 1 if IOSide.West in io_sides else 0
x_max = width - 2 if IOSide.East in io_sides else width - 1
y_min = 1 if IOSide.North in io_sides else 0
y_max = height - 2 if IOSide.South in io_sides else height - 1
Expand Down Expand Up @@ -207,11 +205,21 @@ def create_uniform_interconnect(width: int,
current_track = 0
for track_len in track_lens:
for _ in range(track_info[track_len]):

# This function connects neighboring switchboxes to each other (North, south east, west)
# MO: HACK: try doing in two passes
interconnect.connect_switchbox(interconnect_x_min, interconnect_y_min, interconnect_x_max,
interconnect_y_max,
track_len,
current_track,
InterconnectPolicy.Ignore)

# For unconnected I/O tiles
interconnect.connect_switchbox(x_min, interconnect_y_min, interconnect_x_max,
interconnect_y_min,
track_len,
current_track,
InterconnectPolicy.Ignore)
current_track += 1

# insert io
Expand Down

0 comments on commit e451974

Please sign in to comment.