Main Content

configureModelWithHardware

Configure Simulink model for code generation on Qualcomm Hexagon hardware

Since R2024b

Description

configureModelWithHardware(Model,Hardware) configure a Simulink model for code generation tailored to specific Qualcomm Hexagon hardware platforms. This function facilitates the transition between simulation environments by setting up the model to use the Qualcomm Hexagon Simulator.

example

Examples

collapse all

Use of configureModelWithHardware within a test method to configure a model for the Qualcomm Hexagon Simulator, simulate it in normal and processor-in-the-loop (PIL) modes, and verify the simulation results.

Load and configure the model for specified hardware.

testCase = sltest.TestCase.forInteractiveUse
Model = hexagon_ifir_filter
testCase.loadSystem(Model);
configureModelWithHardware(Model, 'Qualcomm Hexagon Simulator');

Switch to PIL simulation mode and rerun.

set_param(testCase.Model, 
'SimulationMode', 'processor-in-the-loop (pil)');
actual = testCase.simulate(testCase.Model);
Build Summary
 
Top model targets:
 
Model                  Build Reason                             Status          
================================================================================
hexagon_ifir_filter    Compilation artifacts were out of date.  Code compiled.  
 
1 of 1 models built (0 models already up to date)
Build duration: 0h 0m 4.9948s
### Connectivity configuration for component "hexagon_ifir_filter": Hexagon Simulator ###
### Preparing to start PIL simulation ...
### Using toolchain: Qualcomm(R) Hexagon(TM) LLVM C/C++ Compiler

Input Arguments

collapse all

Specify the Simulink model to configure and deploy the generated code on Qualcomm Hexagon Simulator.

Example: 'hexagon_ifir_filter'

Data Types: char

A string or character vector specifying the target hardware for Qualcomm Hexagon family.

Data Types: char

Version History

Introduced in R2024b