Filter löschen
Filter löschen

How can i select a different core in PIL Simulation ?

6 Ansichten (letzte 30 Tage)
Afraa Ibtissem Derbal
Afraa Ibtissem Derbal am 16 Mai 2022
Beantwortet: Shreshth am 9 Jan. 2024
Hello,
I'm working on a project that require PIL Simulation with a hardware target containing 4 arm cortexR52, the PIL simulation is done for one Block at the time, instead of the whole Model, each of these block has been converted to a model referenced block.
We noticed that each time the "application.elf " created is executed on the CORE0, yet for some of the blocks we would like to select another core in order to enable other features.
How can we change the Core selection in a PIL simulation ?
Thank you in advance for your help !

Antworten (1)

Shreshth
Shreshth am 9 Jan. 2024
Hello Afraa,
I understand that you want to perform Processor-in-the-Loop (PIL) simulations on a hardware platform equipped with four ARM Cortex-R52 cores. However for certain blocks you want to execute the generated code on different cores (CORE1, CORE2, or CORE3) to take advantage of additional functionalities that are specific to those cores.
In order to change the core selection for Processor-in-the-Loop (PIL) simulation when targeting a multicore processor like the ARM Cortex-R52, you will typically need to modify the build configuration or the target settings to specify which core should execute the generated code.
You can follow the below steps:
  1. Modify the Target Configuration File: If you are using a custom target with MATLAB/Simulink, you might have a target configuration file (.tcf) that specifies settings for code generation. Within this file, you can set the core affinity for the generated application.
  2. Use the Custom Code Settings: In Simulink, you can specify custom code settings for model reference blocks. You can access these settings by right-clicking on the block and navigating to Block Parameters (ModelReference) > Simulation Target > Custom Code. Here, you can add specific compiler flags or attributes to control the core allocation.
  3. Makefile/Build Scripts: Edit your makefile or build scripts to add compiler/linker options for targeting a specific core.
  4. Runtime Core Affinity: Set the core affinity at runtime using OS tools or APIs, if available.
You can also refer to the documentation provided by MathWorks
Thank you,
Shubham Shreshth.

Kategorien

Mehr zu Multicore Processor Targets finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by