Skip to content

Commit 380e60a

Browse files
committedOct 22, 2015
fhdl/namer: fix object aliasing bug
1 parent 1eef71b commit 380e60a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

Diff for: ‎migen/fhdl/namer.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,10 @@ def _build_signal_groups(signals):
182182
related_list.insert(0, cur_signal)
183183
cur_signal = cur_signal.related
184184
# add to groups
185-
r += [set()]*(len(related_list) - len(r))
186-
for target_set, source_set in zip(r, related_list):
187-
target_set.add(source_set)
185+
for _ in range(len(related_list) - len(r)):
186+
r.append(set())
187+
for target_set, source_signal in zip(r, related_list):
188+
target_set.add(source_signal)
188189
# with the algorithm above and a list of all signals,
189190
# a signal appears in all groups of a lower number than its.
190191
# make signals appear only in their group of highest number.

0 commit comments

Comments
 (0)
Please sign in to comment.