You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sink Stream in LiteDRAMDMAWriter has the 'ready' flag set by default.
If with_csr is set, shouldn't the 'sink.ready' flag only be set if the 'enable' bit is set in the CSR?
At the moment you can connect a Stream to the DMA and it will accept data even when the DMA is not enabled. This seems wrong.
I want to be able to set the 'base'/'length' of the transfer, pointing to an address in DRAM. Then set 'enable'. It would also be good to be able to use the sink Stream's 'last' flag to terminate the transfer and generate an event. So you can wait for a packet to complete, without having to know in advance the number of bytes to be transferred. The transfer should stop & generate an event when the 'last' word is transferred, or the 'offset' number of words have been transferred, whichever happens first.
I've got a fix for the first flag too. Not sure how to proceed. What would be a good way of testing the code? How should I go about writing unit tests for this?
In order to avoid breakages in other people's code it might be worth adding a defaulted parameter to the constructors of the LiteDRAMDMAReader/Writer classes.
I'm trying to write code that allows me to interface my Streams library https://github.com/DaveBerkeley/streams to the DMA interface of a LiteX SoC. The idea is to be able to send packets of data across a stream from RISC-V ram space and receive packets on a DMA Writer, with an interrupt when the packet completes. The first/last/ready flags all need some changes to enable this.
The aim is to make a vector processor in Amaranth HDL that can be driven by a pair of DMA controllers from the RISC-V.
The sink Stream in LiteDRAMDMAWriter has the 'ready' flag set by default.
If with_csr is set, shouldn't the 'sink.ready' flag only be set if the 'enable' bit is set in the CSR?
At the moment you can connect a Stream to the DMA and it will accept data even when the DMA is not enabled. This seems wrong.
I want to be able to set the 'base'/'length' of the transfer, pointing to an address in DRAM. Then set 'enable'. It would also be good to be able to use the sink Stream's 'last' flag to terminate the transfer and generate an event. So you can wait for a packet to complete, without having to know in advance the number of bytes to be transferred. The transfer should stop & generate an event when the 'last' word is transferred, or the 'offset' number of words have been transferred, whichever happens first.
The logic can be fixed as follows :
The text was updated successfully, but these errors were encountered: