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

ERROR: ROM size exceeds 48KiB during system level simulation #683

Open
diswd opened this issue Jan 8, 2025 · 3 comments
Open

ERROR: ROM size exceeds 48KiB during system level simulation #683

diswd opened this issue Jan 8, 2025 · 3 comments

Comments

@diswd
Copy link

diswd commented Jan 8, 2025

Hi all,
I am trying to run system level simulation of Caliptra. During simulating some functions such as hmac,ecc,dma,sha256 and so on, the error "ROM size exceeds 48KiB" which is set in "caliptra-rtl-main/src/integration/test_suites/libs/riscv_hw_if/link.ld" will occur. But some functions such as sha512 and sha_accel will not occur this error and can be simulated normally. Could you please tell me how to solve this error? Thank you very much.

@pranjal3060
Copy link

Either you can increase the ROM size or you can try to optimize the code.

@diswd
Copy link
Author

diswd commented Jan 10, 2025

Either you can increase the ROM size or you can try to optimize the code.

Thanks for your reply. Do you know how to increase the ROM size in Caliptra?

@calebofearth
Copy link
Collaborator

This linker script is used to compile Caliptra unit tests/smoke tests - it is not used for the actual production ROM, which is maintained over at caliptra-sw.

The linker script throws an error when the firmware being compiled exceeds the available ROM memory in Caliptra. Smoke tests that are known to work are listed in the L0 regression (which is run for every new Pull Request to main).

Increasing ROM size is not permitted by integrators, as this violates the Caliptra Trademark policy that requires integrators to consume Caliptra RTL as-is, without modification.
(We are increasing memory sizes as part of the Caliptra 2.0 release - see #681. But this change will be part of the official release and should not be modified afterwards).

If you've written your own test and are trying to compile it with our Makefile, you can do a few things:

  • split your test into many smaller tests
  • put large data variables into a DCCM section that is directly loaded into DCCM at simulation start (like shown here) so they don't consume memory in the ROM
  • use a custom linker script specific to your new test case (for example, see smoke_test_mldsa)

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

3 participants