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

M85: Switch to DTCM #8

Open
mkannwischer opened this issue Jul 22, 2024 · 0 comments
Open

M85: Switch to DTCM #8

mkannwischer opened this issue Jul 22, 2024 · 0 comments

Comments

@mkannwischer
Copy link
Contributor

In #4, I could not get the NTT tests (Kyber and Dilithium) to work on the M85 when only using the 32 KB DTCM of the AN555.
Reason for that is that each variant of the NTT has their own set of twiddle factors which are stored in RAM. This adds up and unfortunately, exceeds the available DTCM; each individual NTT of course would fit. Once could store the twiddles in ROM, but that will result in a performance penalty.
The solution was to temporarily switch to the internal SRAM which is 2x2 MiB. However this results in a performance penalty, too, so it's not a solution.

@hanno-becker and I discussed that the way forward is to store twiddles in ROM, but copy them to DTCM prior to using them.
However, this requires changing the tests and the APIs for the NTTs (which in turn required some refactoring in SLOTHY).
Probably a good idea to do that when we are touching the MVE NTTs the next time.

See the memory layour here: https://developer.arm.com/documentation/107642/latest/
image

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

No branches or pull requests

1 participant