diff --git a/artiq/gateware/rtio/dma.py b/artiq/gateware/rtio/dma.py index 20d558672..7f5d27d18 100644 --- a/artiq/gateware/rtio/dma.py +++ b/artiq/gateware/rtio/dma.py @@ -110,7 +110,7 @@ class RawSlicer(Module): for i in range(out_size)})), If(shift_buf, Case(self.source_consume, {i: buf.eq(buf[i*g:]) - for i in range(out_size)})), + for i in range(out_size + 1)})), ] fsm = FSM(reset_state="FETCH") diff --git a/artiq/gateware/test/rtio/test_dma.py b/artiq/gateware/test/rtio/test_dma.py index 84bc4a3ff..b67f27db5 100644 --- a/artiq/gateware/test/rtio/test_dma.py +++ b/artiq/gateware/test/rtio/test_dma.py @@ -67,6 +67,7 @@ def do_dma(dut, address): test_writes1 = [ (0x01, 0x23, 0x12, 0x33), (0x901, 0x902, 0x11, 0xeeeeeeeeeeeeeefffffffffffffffffffffffffffffff28888177772736646717738388488), + (0x82, 0x289, 0x99, int.from_bytes(b"\xf0" * 64, "little")), (0x81, 0x288, 0x88, 0x8888) ]