lasmibus/crossbar: better switching policy
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 15 Jun 2013 14:51:09 +0000 (16:51 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 15 Jun 2013 14:51:09 +0000 (16:51 +0200)
migen/bus/lasmibus.py

index 201a9f714731441ff40b217e710f6b5d4fc6b532..be724ac13d66a2b61692bd9e3733a30d6d043b6f 100644 (file)
@@ -65,14 +65,11 @@ class Crossbar(Module):
                                bank = getattr(controller, "bank"+str(nb))
 
                                # arbitrate
-                               rr = roundrobin.RoundRobin(nmasters, roundrobin.SP_CE)
+                               rr = roundrobin.RoundRobin(nmasters, roundrobin.SP_WITHDRAW)
                                self.submodules += rr
                                bank_selected = [cs & (ba == nb) for cs, ba in zip(controller_selected, m_ba)]
                                bank_requested = [bs & master.stb for bs, master in zip(bank_selected, self.masters)]
-                               self.comb += [
-                                       rr.request.eq(Cat(*bank_requested)),
-                                       rr.ce.eq(~bank.stb | bank.ack)
-                               ]
+                               self.comb += rr.request.eq(Cat(*bank_requested)),
 
                                # route requests
                                self.comb += [