[dma/rtl] control.abort sets status.aborted immediately
Nobody has claimed this yet.
- Dominant language
- SystemVerilog
- Stars
- 3.6k
- Forks
- 1.1k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 141
Description
### Description
Firmware can cancel a DMA operation using control.abort. The documentation mentions that status.aborted is set once the aborted operation drains. However, in RTL (dma.sv line [1239-1240](https://github.com/lowRISC/opentitan/blob/b16f2be75d2f38c62d861208453ed5b81ccf41b0/hw/ip/dma/rtl/dma.sv#L1239-L1240)), status.aborted is immediately set once control.abort is registered. Hence, it could be that after an abort operation, which was flagged as completed by status.aborted, TLUL requests are still in flight. In RTL, we could fix this by using the outstanding requests counter from the TLUL adapter in dma.sv. Software can bypass this by using a busy-spin before the next DMA operation.
Thanks to Vishal Bhogade (@vishalbb-git) for reporting this!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in hw/ip/dma/rtl/dma.sv at lines 1239-1240, then inspect the TLUL adapter's outstanding requests counter and the surrounding abort handling. Confirm the documented drain behavior and ensure status.aborted is not reported until no TLUL requests from the aborted operation remain in flight.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100