lasmibus/crossbar: simplify master ack generation
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Sun, 7 Jul 2013 16:56:43 +0000 (18:56 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Sun, 7 Jul 2013 16:56:43 +0000 (18:56 +0200)
migen/bus/lasmibus.py

index 949530a570360ce178265b4d2230c76b40e73795..ab9d15204a0fde2bed779b8ac01bdaac5c97aed2 100644 (file)
@@ -85,7 +85,7 @@ class Crossbar(Module):
                                        bank.we.eq(Array(self.masters)[rr.grant].we),
                                        bank.stb.eq(Array(bank_requested)[rr.grant])
                                ]
-                               master_req_acks = [master_req_ack | ((rr.grant == nm) & Array(bank_selected)[rr.grant] & bank.req_ack)
+                               master_req_acks = [master_req_ack | ((rr.grant == nm) & bank_selected[nm] & bank.req_ack)
                                        for nm, master_req_ack in enumerate(master_req_acks)]
                                master_dat_acks = [master_dat_ack | ((rr.grant == nm) & bank.dat_ack)
                                        for nm, master_dat_ack in enumerate(master_dat_acks)]