From: Sebastien Bourdeauducq Date: Thu, 22 Oct 2015 09:14:51 +0000 (+0800) Subject: fhdl/namer: fix object aliasing bug X-Git-Tag: 24jan2021_ls180~2099^2~3^2~6 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db62efc9c800f378f0017335fccdff87a46a0309;p=litex.git fhdl/namer: fix object aliasing bug --- diff --git a/migen/fhdl/namer.py b/migen/fhdl/namer.py index e6c18cb0..8e0f450d 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.