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

[SnitchDMA] Introduce SnitchDMA dialect #128

Merged
merged 1 commit into from
Sep 1, 2024
Merged

Conversation

zero9178
Copy link
Member

@zero9178 zero9178 commented Sep 1, 2024

The DMA dialect represents DMA operations in their purest forms: Moving data from one MemRef to another.
The real world is unfortunately not as pretty: Snitch's DMA only supports two-dimensional transfers, the zero region is of a specific size and DMA configuration is relatively expensive.

This PR introduces the SnitchDMA dialect which is meant to handle any Snitch specific legalizations but also optimizations.

The intention for the future is to have lowering of DMA operations split into multiple passes and phases performing 1) legalization of DMA transfers, 2) Optimization of configuration, 3) optimization of number of waits and 4) lowering to LLVM.

As a first step, this PR only introduces the dialect and the equivalent of the dmstati instruction which is used in the current one-shot to LLVM lowering.

The DMA dialect represents DMA operations in their purest forms: Moving data from one MemRef to another.
The real world is unfortunately not as pretty: Snitch's DMA only supports two-dimensional transfers, the zero region is of a specific size and DMA configuration is relatively expensive.

This PR introduces the `SnitchDMA` dialect which is meant to handle any Snitch specific legalizations but also optimizations.

The intention for the future is to have lowering of DMA operations split into multiple passes and phases performing 1) legalization of DMA transfers, 2) Optimization of configuration, 3) optimization of number of waits and 4) lowering to LLVM.

As a first step, this PR only introduces the dialect and the equivalent of the `dmstati` instruction which is used in the current one-shot to LLVM lowering.
@zero9178 zero9178 merged commit d7994f5 into main Sep 1, 2024
1 check passed
@zero9178 zero9178 deleted the snitch-dma-dialect branch September 1, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant