From: Robert Jordens Date: Thu, 25 Jul 2013 21:55:05 +0000 (-0600) Subject: genlib/roundrobin.py: fix n==1 case X-Git-Tag: 24jan2021_ls180~2099^2~503 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b8ff2f27928b57c1f8eff959f34edd9d12b15a29;p=litex.git genlib/roundrobin.py: fix n==1 case --- diff --git a/migen/genlib/roundrobin.py b/migen/genlib/roundrobin.py index 15bec5c7..cf42e943 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=n) + self.grant = Signal(max=max(1, n)) self.switch_policy = switch_policy if self.switch_policy == SP_CE: self.ce = Signal()