mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
genlib/roundrobin.py: fix n==1 case
This commit is contained in:
parent
b96eb339af
commit
b8ff2f2792
1 changed files with 1 additions and 1 deletions
|
@ -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=n)
|
self.grant = Signal(max=max(1, 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 a new issue