Merge pull request #1423 from zyp/improve_dma

Improve DMA
This commit is contained in:
enjoy-digital 2022-09-14 09:57:43 +02:00 committed by GitHub
commit 0adb604c97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -182,13 +182,12 @@ class WishboneDMAWriter(Module, AutoCSR):
self.submodules += fsm
self.comb += fsm.reset.eq(~self._enable.storage)
fsm.act("IDLE",
self.sink.ready.eq(1),
NextValue(offset, 0),
NextState("RUN"),
)
fsm.act("RUN",
self._sink.valid.eq(self.sink.valid),
self._sink.last.eq(offset == (length - 1)),
self._sink.last.eq(self.sink.last | (offset + 1 == length)),
self._sink.address.eq(base + offset),
self._sink.data.eq(self.sink.data),
self.sink.ready.eq(self._sink.ready),