Skip to content
This repository was archived by the owner on Jan 18, 2026. It is now read-only.

feat: add nac3_{malloc, free}#2824

Draft
HTGAzureX1212 wants to merge 6 commits into
m-labs:masterfrom
HTGAzureX1212:master
Draft

feat: add nac3_{malloc, free}#2824
HTGAzureX1212 wants to merge 6 commits into
m-labs:masterfrom
HTGAzureX1212:master

Conversation

@HTGAzureX1212

Copy link
Copy Markdown

Same as adding dynamic memory allocation support to ARTIQ/Zynq.

@sbourdeauducq

Copy link
Copy Markdown
Member

Not sure if this works. RISC-V devices don't have cache coherency and I suspect this code assumes it.

@HTGAzureX1212

Copy link
Copy Markdown
Author

Not sure if this works. RISC-V devices don't have cache coherency and I suspect this code assumes it.

Hmm, maybe I need to use atomic types then

@sbourdeauducq

Copy link
Copy Markdown
Member

That's not going to help. Please read up on cache coherency models.

@HTGAzureX1212

HTGAzureX1212 commented Jul 30, 2025

Copy link
Copy Markdown
Author

Would fence instructions help? (perhaps we could do what is already done on Zynq - having two separate heaps...)

@sbourdeauducq

Copy link
Copy Markdown
Member

No, the cache issue is on MiSoC side and instructions like fence are not implemented. See how the caches are explicitly invalidated by the existing code when passing data between the CPU cores.
Two separate heaps would work.

@HTGAzureX1212 HTGAzureX1212 changed the title feat: add nac3_{free, malloc} feat: add nac3_{malloc, rc_incr, rc_decr} Jul 31, 2025
@HTGAzureX1212 HTGAzureX1212 changed the title feat: add nac3_{malloc, rc_incr, rc_decr} feat: add nac3_{malloc, free} Aug 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants