From b8ff2f27928b57c1f8eff959f34edd9d12b15a29 Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Thu, 25 Jul 2013 15:55:05 -0600 Subject: [PATCH] genlib/roundrobin.py: fix n==1 case --- migen/genlib/roundrobin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migen/genlib/roundrobin.py b/migen/genlib/roundrobin.py index 15bec5c7f..cf42e9436 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()