Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unnecessary pass #61

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions canal/interconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,18 +507,11 @@ def get_route_bitstream(self, routes: Dict[str, List[List[Node]]], use_fifo: boo
if use_fifo and len(segment) >= 4:
reg_nodes = []
idx = 0
while idx < (len(segment) - 4):
while idx < len(segment):
pre_node = segment[idx]
if isinstance(pre_node, RegisterNode):
if pre_node not in reg_nodes:
reg_nodes.append(pre_node)
# reg -> rmux -> sb -> sb -> reg
next_idx = idx + 4
next_node = segment[next_idx]
if isinstance(next_node, RegisterNode):
if next_node not in reg_nodes:
reg_nodes.append(next_node)
idx += 4
idx += 1
if len(reg_nodes) != 0:
assert len(reg_nodes) != 1, "Cannot have standalone FIFO reg in the segment"
Expand Down
Loading