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 Axi bus behind the DMA engine #1878

Merged
merged 11 commits into from
Jan 23, 2025
Merged

Add Axi bus behind the DMA engine #1878

merged 11 commits into from
Jan 23, 2025

Conversation

ArthurHeymans
Copy link
Contributor

This rewrites the DMA engine to operate on the Axi bus which is a 64bit bus.
The recovery register interface is placed on that bus.
An Axi address offset is placed in soc_ifc.

@ArthurHeymans ArthurHeymans force-pushed the AxiBus branch 3 times, most recently from 25a9e87 to ba108e4 Compare January 8, 2025 17:09
Copy link
Contributor

@swenson swenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to keep the I3C RDL and autogenerated code. I have a PR I am working on that adapts the DMA driver to implement the ureg::Mmio and ureg::MmioMut interfaces, so that we can use the autogenerated I3C code and not write everything manually.

Copy link
Collaborator

@mhatrevi mhatrevi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see the feedback.

@ArthurHeymans ArthurHeymans force-pushed the AxiBus branch 2 times, most recently from 1707e05 to 0879541 Compare January 15, 2025 09:14
@ArthurHeymans ArthurHeymans force-pushed the AxiBus branch 3 times, most recently from 5ea6b54 to fb49c55 Compare January 15, 2025 09:22
@ArthurHeymans
Copy link
Contributor Author

I would like to keep the I3C RDL and autogenerated code. I have a PR I am working on that adapts the DMA driver to implement the ureg::Mmio and ureg::MmioMut interfaces, so that we can use the autogenerated I3C code and not write everything manually.

Done

@ArthurHeymans
Copy link
Contributor Author

Please see the feedback.

Addressed it all.

I also added some driver and other fixes that should make your test branch get further.

drivers/src/dma.rs Outdated Show resolved Hide resolved
@ArthurHeymans ArthurHeymans force-pushed the AxiBus branch 2 times, most recently from 95d1122 to cc613e5 Compare January 22, 2025 16:28
swenson
swenson previously approved these changes Jan 22, 2025
Copy link
Contributor

@swenson swenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

ArthurHeymans and others added 11 commits January 22, 2025 15:23
There was confusion on how that the dma engine operated on a axi bus
that replaced the apb bus. This is not true. AXI is a completely
separate bus and the DMA widget is a bridge to it.

Signed-off-by: Arthur Heymans <[email protected]>
DMA operates on a separate bus and not the root bus so remove it.

Signed-off-by: Arthur Heymans <[email protected]>
This rewrites the dma widget to work with a separate axi_root_bus bus.

Signed-off-by: Arthur Heymans <[email protected]>
This also adds the offset in the soc_ifc registers.

Signed-off-by: Arthur Heymans <[email protected]>
These unit tests had the wrong understanding in mind of the DMA/AXI
widget.

Signed-off-by: Arthur Heymans <[email protected]>
Reading the production debug fuses needs this.

Signed-off-by: Arthur Heymans <[email protected]>
Signed-off-by: Arthur Heymans <[email protected]>
Don't use memcpy as this results in unaligned reads on the DMA FIFO
read/write registers.

Instead don't allow slices that aren't a multiple of 4.

Signed-off-by: Arthur Heymans <[email protected]>
Copy link
Contributor

@swenson swenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mhatrevi mhatrevi merged commit 051960e into main-2.x Jan 23, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Caliptra v2.0 Items to be considered for v2.0 Release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants