mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
corelogic/roundrobin: handle correctly special case with 1 request source
This commit is contained in:
parent
94b02aa8ed
commit
0dfc215fe8
1 changed files with 24 additions and 21 deletions
|
@ -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)])
|
||||
|
|
Loading…
Reference in a new issue