dma: fix off-by-one error in RawSlicer (#2090)

Signed-off-by: Jonathan Coates <jonathan.coates@oxionics.com>
This commit is contained in:
Jonathan Coates 2023-05-23 04:15:39 +01:00 committed by Sebastien Bourdeauducq
parent 0323946ffb
commit c691560fd6
2 changed files with 2 additions and 1 deletions

View File

@ -122,7 +122,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")

View File

@ -68,6 +68,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)
]