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

Correct way to use L2_PRIV0 and L2_SHARED naturally #427

Open
2080fresh opened this issue Aug 12, 2024 · 0 comments
Open

Correct way to use L2_PRIV0 and L2_SHARED naturally #427

2080fresh opened this issue Aug 12, 2024 · 0 comments

Comments

@2080fresh
Copy link

2080fresh commented Aug 12, 2024

Hi, I'm working on academic research on pulpissimo. Thank you for the open-source nature.

I've found that pulpissimo has a memory map with

L2_PRIV0 (expected to be L1D cache 0x1c000000 ~ 0x1c008000) - 32kB
L2_PRIV1 (L1I cache 0x1c008000 ~ 0x1c010000) - 32kB
L2_SHARED (0x1c010000 ~ 0x1c080000)
The problem is that if I use an array or 'malloc' above a certain level, it seems the data overflows L2_PRIV0(L1D) and uses L2_PRIV1(which is the space of the PC address). So when the pulpissimo starts to read the first PC address (which is set on ENTRY_POINT=0x1c008080), it spits an illegal instruction error on 0x1c008080.

I wonder why when the data is flushed on L2_PRIV0, it uses L2_PRIV1, not L2_SHARED. It is common that It uses L2 when the L1D is full.

I want to know the way how to use L2_PRIV0 and L2_SHARED naturally for using lots of mallocs.

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