From fe87221d2b4da14ba7a99e27aed80d1bbbe8f715 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 9 May 2013 10:51:50 +0200 Subject: [PATCH] dvisampler/dma: reverse slot allocation order --- milkymist/dvisampler/dma.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/milkymist/dvisampler/dma.py b/milkymist/dvisampler/dma.py index 4bded6158..0013bc184 100644 --- a/milkymist/dvisampler/dma.py +++ b/milkymist/dvisampler/dma.py @@ -46,7 +46,7 @@ class _SlotArray(Module, AutoCSR): change_slot = Signal() current_slot = Signal(max=nslots) - self.sync += If(change_slot, [If(slot.address_valid, current_slot.eq(n)) for n, slot in enumerate(slots)]) + self.sync += If(change_slot, [If(slot.address_valid, current_slot.eq(n)) for n, slot in reversed(list(enumerate(slots)))]) self.comb += change_slot.eq(~self.address_valid | self.address_done) self.comb += [