Allocating parameters to ramfuncs section

I need to execute parts of my code on the C2000 from RAM. I was able to generate code from my subsystem into a non‑reusable, standalone function and copy that function to RAM. I also need to copy some of the parameters used by this function into RAM so they can execute more quickly.
Paragraph 7 of the following document attempts to describe the process, but it does not provide enough detail to follow:
Could you provide guidance and a step‑by‑step explanation of how to perform this operation?

Antworten (1)

Adarsh
Adarsh am 10 Apr. 2026 um 10:29

0 Stimmen

Here is a brief explanation of point 7 in the given documentation link.
1) Firstly, execute the following command to create a Simulink parameter to the ramfuncs section
demoParam = tic2000demospkg.Parameter
2) Now in the MATLAB's workspace panel you can see the variable named "demoParam"
3) Click on the "demoParam" variable in the MATLAB's workspace panel
4) Open the code generation tab as mentioned in the image below and select "const_data_ramfuncs" this will allow this will indicate the model to store the parameters in ROM and load them into RAM during execution
5) Once you click "OK", you can replace the previous parameters in the blocks of simulink model with the new parameter that you have created.
This is the brief gist of what the point 7 in the given documenatation states.
I hope this helps!

1 Kommentar

Valeriy
Valeriy vor etwa 2 Stunden
Is there a difference if the parameter that needs to be moved to RAM is specified in .sldd, not in workspace?
I am also not able to see the code_data_ramfuncs selection in the list on Code Generation tab. What is the process to add it to the list?
Thanks.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Simulink Environment Customization finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2024b

Gefragt:

am 31 Mär. 2026 um 17:33

Kommentiert:

vor etwa 2 Stunden

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by