forked from M-Labs/artiq
1
0
Fork 0

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 GitHub
parent c1d6fd4bbe
commit ea9fe9b4e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -122,7 +122,7 @@ class RawSlicer(Module):
for i in range(out_size)})), for i in range(out_size)})),
If(shift_buf, Case(self.source_consume, If(shift_buf, Case(self.source_consume,
{i: buf.eq(buf[i*g:]) {i: buf.eq(buf[i*g:])
for i in range(out_size)})), for i in range(out_size + 1)})),
] ]
fsm = FSM(reset_state="FETCH") fsm = FSM(reset_state="FETCH")

View File

@ -68,6 +68,7 @@ def do_dma(dut, address):
test_writes1 = [ test_writes1 = [
(0x01, 0x23, 0x12, 0x33), (0x01, 0x23, 0x12, 0x33),
(0x901, 0x902, 0x11, 0xeeeeeeeeeeeeeefffffffffffffffffffffffffffffff28888177772736646717738388488), (0x901, 0x902, 0x11, 0xeeeeeeeeeeeeeefffffffffffffffffffffffffffffff28888177772736646717738388488),
(0x82, 0x289, 0x99, int.from_bytes(b"\xf0" * 64, "little")),
(0x81, 0x288, 0x88, 0x8888) (0x81, 0x288, 0x88, 0x8888)
] ]