- Would you mind checking the example mentioned there on your hardware and seeing if that worked?
- Could you clarify what you mean by three differnt main functions? Would it be possible for you to share the SImulink model?
MultiCore Programming on Raspberry Pi via Simulink
11 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
i am currently developing a model in simulink with three different main functions (let's call them A,B,C for now), where one of them is running at a different sample time as the other ones. However, I tried to simulate this system on the Raspberry Pi via external mode but got a lot of overruns and a high cpu load. Now, I am trying to split the model, so that for example functions A and B are executed on one core and function C is executed on another core.
For this, I used this article from Mathworks, but I think that you can't actually assign one task to a core but just specify the periodic execution. As a result I could reduce the cpu load to a maximum of 40% but still get a lot of overruns (imo, this also contradicts itself).
As a second approach, I tried this article but I think this is not possible for Raspberry Pis since I can not add and assign cores in the concurrent execution tab.
My goal is to assign each task to a core on the raspberry and see the cpu load on the raspberry pi.
Did someone try this before or can help me?
Many thanks in advance!
0 个评论
回答(1 个)
Nakul Khadilkar
2023-2-3
移动:Joel Van Sickel
2023-4-13
Hello Derk,
Thanks for the detailed explanation of your steps. Multi core programming from a Simulink model with different sample times is indeed what is showcased in the article you linked above.
Also, I suggest you try steps mentioned in the Partition Simulink Model Using Explicit Partitioning section of the article to understand how to map the periodic tasks to each core via the concurrent panes UI dialog. The key is to group the simulink blocks with the same rate into subsystems which can then be put into a concurrent execution hierarchy.
Regards,
Nakul Khadilkar
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Run on Target Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

