From: Robert Jordens Date: Fri, 26 Jul 2013 07:33:18 +0000 (+0200) Subject: genlib/roundrobin: fix n==1 case (correctly) X-Git-Tag: 24jan2021_ls180~2099^2~502 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e1195415e29958a430f379584a1366d53f07bca;p=litex.git genlib/roundrobin: fix n==1 case (correctly) --- diff --git a/migen/genlib/roundrobin.py b/migen/genlib/roundrobin.py index cf42e943..d8ee65f1 100644 --- a/migen/genlib/roundrobin.py +++ b/migen/genlib/roundrobin.py @@ -5,7 +5,7 @@ from migen.fhdl.std import * class RoundRobin(Module): def __init__(self, n, switch_policy=SP_WITHDRAW): self.request = Signal(n) - self.grant = Signal(max=max(1, n)) + self.grant = Signal(max=max(2, n)) self.switch_policy = switch_policy if self.switch_policy == SP_CE: self.ce = Signal()