genlib/roundrobin: fix n==1 case (correctly)
This commit is contained in:
parent
b8ff2f2792
commit
6e1195415e
|
@ -5,7 +5,7 @@ from migen.fhdl.std import *
|
||||||
class RoundRobin(Module):
|
class RoundRobin(Module):
|
||||||
def __init__(self, n, switch_policy=SP_WITHDRAW):
|
def __init__(self, n, switch_policy=SP_WITHDRAW):
|
||||||
self.request = Signal(n)
|
self.request = Signal(n)
|
||||||
self.grant = Signal(max=max(1, n))
|
self.grant = Signal(max=max(2, n))
|
||||||
self.switch_policy = switch_policy
|
self.switch_policy = switch_policy
|
||||||
if self.switch_policy == SP_CE:
|
if self.switch_policy == SP_CE:
|
||||||
self.ce = Signal()
|
self.ce = Signal()
|
||||||
|
|
Loading…
Reference in New Issue