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

facing issues when C code size goes beyond 8KB #111

Open
yash-agnisys opened this issue Nov 8, 2022 · 1 comment
Open

facing issues when C code size goes beyond 8KB #111

yash-agnisys opened this issue Nov 8, 2022 · 1 comment

Comments

@yash-agnisys
Copy link

Hello,

I am using the swerv RTL and a mixed uvm + C environment to test out my firmware code. I generally write my test and cross-compile the c code to generate the object file and further generate the hex file which is loaded into the mem in "ahb_sif.sv" file. In the linker file i am placing the C code at loaction 0x80000000 onwards.
The object file has components which contains different sections i.e., text, bss, data.
I am facing issues whenever, the text section in object file goes above 8KB, the environment hangs up. The text section below 8KB runs fine.
So my questions are :

  1. Is there some limitations to code size that can be loaded into memory?
  2. I can see in the ahb_sif.sv file that, the "mem" has been changed from the earlier commits.
    Earlier :
    bit [7:0] mem [0:MEM_SIZE_DW-1];
    Now:
    bit [7:0] mem [bit[31:0]];

if that's the case, how can code be loaded into such small memory?

Regards,
Yash

@algrobman
Copy link

bit[7:0] mem[bit[31:0]] is associative array, which can hold up to 4GB data .. it's byte array addressed by 32 bit address.

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

2 participants