mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
cores/dma/WishboneDMAWriter: Add ready_on_idle parameter and set it to 1 by default.
This allows controlling ready behavior on idle state.
This commit is contained in:
parent
0adb604c97
commit
3cd4a3830c
1 changed files with 2 additions and 1 deletions
|
@ -155,7 +155,7 @@ class WishboneDMAWriter(Module, AutoCSR):
|
|||
if with_csr:
|
||||
self.add_csr()
|
||||
|
||||
def add_csr(self, default_base=0, default_length=0, default_enable=0, default_loop=0):
|
||||
def add_csr(self, default_base=0, default_length=0, default_enable=0, default_loop=0, ready_on_idle=1):
|
||||
self._sink = self.sink
|
||||
self.sink = stream.Endpoint([("data", self.bus.data_width)])
|
||||
|
||||
|
@ -182,6 +182,7 @@ class WishboneDMAWriter(Module, AutoCSR):
|
|||
self.submodules += fsm
|
||||
self.comb += fsm.reset.eq(~self._enable.storage)
|
||||
fsm.act("IDLE",
|
||||
self.sink.ready.eq(ready_on_idle),
|
||||
NextValue(offset, 0),
|
||||
NextState("RUN"),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue