[hw,dma,rtl] Add STATUS.chunk_done bit
This PR adds a new STATUS.chunk_done bit to the status register to determine the cause when the DMA stopped an operation. In multi-chunk mem2mem transfers, where each chunk is transferred with a separate SW-go, chunk_done goes high when finishing every chunk, except the last chunk, where done goes high. The done interrupt fires for every chunk for now.
@alees24 Thanks for the review. Could you take another look? CI is currently failing because the integrated_dev branch is not able to correctly create the auto-generated unittests for status interrupts, which is fixed on master. The plan is to rebase that PR on top of master and merge it there once the DMA is in there.
@alees24 Thanks for the review. Could you take another look to get this merged?
I updated the DV environment to deal with the status interrupts. All tests except the automated dma_intr_test (comfortable test) fail. Could you take a look into this one? Otherwise, maybe. @rswarbrick. Note, tests need to include https://github.com/lowRISC/opentitan/pull/24962 to pass.
The RTL changes look okay, thanks, but I'm seeing more than just dma_intr_test failing presently:
0.dma_abort.88760512117758134865029955350941779515590544128422615357238515974507785526752\
0.dma_intr_test.67386857437561253008700698343085724055010273966100030887847157593273296727411\
0.dma_memory_region_lock.62058440537178885937077771562078581177386725377790603349600473204830182595305\
I'll try to investigate these shortly, but if you happen to get to it before I do, please try those seeds; busy with another project release right now.
It seems there is an issue on how predicted interrupts are getting cleared. When a DMA gets aborted, the interrupt prediction queue is left untouched. After some while, a previously predicted interrupt expectation gets asserted.
There is a second issue where the abort occurs just before a done. It seems there is an interrupt predicted although the abort has higher preiority.
With the proposed DV changes to fix dma_abort and dma_intr_test, I'm seeing only:
Assertion range_regwen_rd_A has failed
For dma_memory_region_lock, and by inclusion dma_stress_all, which is because the autogen FPV is unaware of MuBi regwens on master at present. I think we can defer that issue for now.
Thanks @alees24 for looking into this. I cherry picked your changes into that PR.