Skip to content
Browse files

genlib/roundrobin.py: fix n==1 case

  • Loading branch information...
1 parent b96eb33 commit b8ff2f27928b57c1f8eff959f34edd9d12b15a29 @jordens jordens committed with sbourdeauducq
Showing with 1 addition and 1 deletion.
  1. +1 −1 migen/genlib/roundrobin.py
View
2 migen/genlib/roundrobin.py
@@ -5,7 +5,7 @@
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()

2 comments on commit b8ff2f2

@jordens
M-Labs member

sorry. got my ones and twos wrong.
this is supposed to be:
self.grant = Signal(max=max(2, n))

@sbourdeauducq
M-Labs member

fixed

Please sign in to comment.
Something went wrong with that request. Please try again.