From: Luke Kenneth Casson Leighton Date: Thu, 9 May 2019 08:26:48 +0000 (+0100) Subject: fix logic-bug in group picker X-Git-Tag: div_pipeline~2094 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a1578b07a7e89d3e82ba05ec93542383344c45f;p=soc.git fix logic-bug in group picker --- diff --git a/src/scoreboard/group_picker.py b/src/scoreboard/group_picker.py index 9518fdf9..333d5b1b 100644 --- a/src/scoreboard/group_picker.py +++ b/src/scoreboard/group_picker.py @@ -17,12 +17,13 @@ class PriorityPicker(Elaboratable): res = [] for i in range(0, self.wid): - tmp = Signal(reset_less = True) + t = Signal(reset_less = True) + res.append(t) if i == 0: - m.d.comb += tmp.eq(self.i[0]) + m.d.comb += t.eq(self.i[0]) else: - m.d.comb += tmp.eq((~tmp) & self.i[i]) - res.append(tmp) + m.d.comb += t.eq((~res[-2]) & self.i[i]) + res.append(t) # we like Cat(*xxx). turn lists into concatenated bits m.d.comb += self.o.eq(Cat(*res))