From 6e1195415e29958a430f379584a1366d53f07bca Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Fri, 26 Jul 2013 09:33:18 +0200 Subject: [PATCH] genlib/roundrobin: fix n==1 case (correctly) --- 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 cf42e9436..d8ee65f1e 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()