Skip to content

Commit

Permalink
test: Shorten DMA registers reference
Browse files Browse the repository at this point in the history
Signed-off-by: Wiktoria Kuna <[email protected]>
  • Loading branch information
wkkuna committed Mar 19, 2024
1 parent 186af33 commit b5fc53c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/test/scala/DMAController/ImageTransfer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,21 @@ class ImageTransfer(dut: DMATop, dmaFull: DMAFull, dmaConfig: DMAConfig) extends
reader.loadFromFile("./img0.rgba")
writer.loadFromFile("./img1.rgba")

control.writePush(DMAConfig.Register.ReaderStartAddr, 0)
control.writePush(DMAConfig.Register.ReaderLineLen, width)
control.writePush(DMAConfig.Register.ReaderLineCnt, height)
control.writePush(DMAConfig.Register.ReaderStride, 0)
control.writePush(Register.ReaderStartAddr, 0)
control.writePush(Register.ReaderLineLen, width)
control.writePush(Register.ReaderLineCnt, height)
control.writePush(Register.ReaderStride, 0)

control.writePush(DMAConfig.Register.WriterStartAddr, height * width * 4 + width * 2)
control.writePush(DMAConfig.Register.WriterLineLen, width)
control.writePush(DMAConfig.Register.WriterLineCnt, height)
control.writePush(DMAConfig.Register.WriterStride, width)
control.writePush(Register.WriterStartAddr, height * width * 4 + width * 2)
control.writePush(Register.WriterLineLen, width)
control.writePush(Register.WriterLineCnt, height)
control.writePush(Register.WriterStride, width)

step(100)

control.writePush(DMAConfig.Register.InterruptMask, 3)
control.writePush(Register.InterruptMask, 3)

control.writePush(DMAConfig.Register.Ctrl, 0xf)
control.writePush(Register.Ctrl, 0xf)

waitRange(dut.io.irq.writerDone, 1, min, max)

Expand Down

0 comments on commit b5fc53c

Please sign in to comment.