corelogic/roundrobin: handle correctly special case with 1 request source

This commit is contained in:
Sebastien Bourdeauducq 2012-03-31 18:01:40 +02:00
parent 94b02aa8ed
commit 0dfc215fe8

View file

@ -13,6 +13,7 @@ class RoundRobin:
self.ce = Signal()
def get_fragment(self):
if self.n > 1:
cases = []
for i in range(self.n):
switch = []
@ -34,3 +35,5 @@ class RoundRobin:
if self.switch_policy == SP_CE:
statement = If(self.ce, statement)
return Fragment(sync=[statement])
else:
return Fragment([self.grant.eq(0)])