From 380e60af55aa6103d31e7feb84d1505e6586cef3 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 22 Oct 2015 17:14:51 +0800 Subject: [PATCH] fhdl/namer: fix object aliasing bug --- migen/fhdl/namer.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/migen/fhdl/namer.py b/migen/fhdl/namer.py index 9044aa86f..e4bb7f10a 100644 --- a/migen/fhdl/namer.py +++ b/migen/fhdl/namer.py @@ -182,9 +182,10 @@ def _build_signal_groups(signals): related_list.insert(0, cur_signal) cur_signal = cur_signal.related # add to groups - r += [set()]*(len(related_list) - len(r)) - for target_set, source_set in zip(r, related_list): - target_set.add(source_set) + for _ in range(len(related_list) - len(r)): + r.append(set()) + for target_set, source_signal in zip(r, related_list): + target_set.add(source_signal) # with the algorithm above and a list of all signals, # a signal appears in all groups of a lower number than its. # make signals appear only in their group of highest number.