dvisampler/dma: reverse slot allocation order
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Thu, 9 May 2013 08:51:50 +0000 (10:51 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Thu, 9 May 2013 08:51:50 +0000 (10:51 +0200)
milkymist/dvisampler/dma.py

index 4bded6158166995babf633b7be4023f77de3e58e..0013bc184108e5ef5a485b9dbb5fabe1e4c7ad61 100644 (file)
@@ -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 += [