Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ add optional direct memory access controller (DMA) #593

Merged
merged 23 commits into from
Apr 23, 2023
Merged

✨ add optional direct memory access controller (DMA) #593

merged 23 commits into from
Apr 23, 2023

Conversation

stnolting
Copy link
Owner

@stnolting stnolting commented Apr 21, 2023

This PR adds a first version of the DMA controller proposed in #579.

This is still ⚠️ work-in-progress and highly 🧪 experimental.

  • add DMA hardware module
  • integrate DMA into processor
    • bus system modifications to shorten critical path (?)
  • add DMA HAL (SW library files)
  • add DMA test case(s) to processor check program
  • add simple DMA example/demo program
  • add DMA to documentation
  • update SVD file

@stnolting stnolting added enhancement New feature or request HW Hardware-related labels Apr 21, 2023
@stnolting stnolting self-assigned this Apr 21, 2023
@stnolting stnolting linked an issue Apr 21, 2023 that may be closed by this pull request
@stnolting stnolting mentioned this pull request Apr 21, 2023
@stnolting stnolting marked this pull request as ready for review April 22, 2023 19:16
@stnolting
Copy link
Owner Author

This seems to be ready. 🚀

The DMA works as expected (see the demo program output below) and consumes about 1.5x the resources of the default UART.

Example 1: Byte-to-byte block transfer using busy wait
Transfer done.
---------------------------
     SRC         DST
[0]  0x66778899  0x66778899
[1]  0x22334455  0x22334455
[2]  0xaabbccdd  0xaabbccdd
[3]  0x0011eeff  0x0011eeff
---------------------------

Example 2: Word-to-word one-to-many transfer using busy wait
Transfer done.
---------------------------
     SRC         DST
[0]  0x66778899  0x66778899
[1]  0x22334455  0x66778899
[2]  0xaabbccdd  0x66778899
[3]  0x0011eeff  0x66778899
---------------------------

Example 3: Byte-to-signed-word block transfer using transfer-done interrupt
<<DMA interrupt!>>
---------------------------
     SRC         DST
[0]  0x66778899  0xffffff99
[1]  0x22334455  0xffffff88
[2]  0xaabbccdd  0x00000077
[3]  0x0011eeff  0x00000066
---------------------------

I need to do some more analyzes regarding efficiency / bus traffic and regarding the impact on the bus system's critical path. Optimizations might follow in future PRs. 😉

@stnolting stnolting merged commit d0cd94a into main Apr 23, 2023
@stnolting stnolting deleted the dma branch April 23, 2023 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request HW Hardware-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simple DMA module
1 participant