Skip to content
Browse files

genlib/ 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/
2 migen/genlib/
@@ -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

M-Labs member

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

M-Labs member


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