Supported Simulink Blocks with CMSIS Library for ARM Cortex-A Processors
The Embedded Coder® Support Package for ARM® Cortex®-A Processors provides a code replacement library (CRL) ARM Cortex-A CMSIS to generate calls to CMSIS-DSP library optimized for ARM Cortex-A processors.
For more information on CMSIS-DSP library, see https://github.com/ARM-software/CMSIS-DSP.
To improve the speed of your models and performance of the generated code, you can set the model configuration parameters under the Code Generation>Optimization category. For more information on how to set the model parameters, see Model Configuration Parameters: Code Generation Optimization.
Note
ARM Cortex-A CMSIS CRL supports both 32 bit and 64 bit ARM Cortex-A architectures.
Only 64 bit ARM Cortex-A architectures support the
half
data type.If you encounter situations where the ARM Cortex-A CMSIS CRL does not provide code replacements due to the input vector length being below the threshold, you can enable CMSIS function generation for all input lengths. To do this, set the environment variable
DISABLE_ARMCORTEXA_CMSIS_CRL_THRESHOLDS
to true using the following command:setenv('DISABLE_ARMCORTEXA_CMSIS_CRL_THRESHOLDS',true)
Basic Math Operations
Operation | Wrappers calling CMSIS Function | Supported data types | Input/Output specifications | Parameter specifications | Replaced Simulink® block |
---|---|---|---|---|---|
Elementwise real addition |
|
|
| - | Sum |
Real vector offset |
| ||||
Elementwise real subtraction |
|
|
| - | Sum |
Elementwise real multiplication |
|
|
| - | Product, Matrix Multiply |
Real vector scale |
|
| Gain | ||
Real absolute |
|
|
| - | Abs |
Real dot product |
|
|
fixed-point real dot product:
| - | Dot Product |
Vector log real |
|
|
| Set the Function parameter of Math Function to
| Math Function |
Vector exponential real |
|
|
| Set the Function parameter of Math Function block
to | Math Function |
Saturate |
|
|
|
| Saturation |
Complex Math Operations
Operation | Wrappers calling CMSIS Function | Supported data types | Input/Output specifications | Parameter specifications | Replaced Simulink block |
---|---|---|---|---|---|
Complex dot product |
|
|
| - | Dot Product |
Complex-by-complex multiplication |
|
|
|
| Product, Matrix Multiply |
Complex-by-real multiplication or real-by-complex multiplication |
|
|
|
| Product, Matrix Multiply |
Matrix Operations
Operation | Function Name | Supported Data Types | Input/Output Specifications | Parameter specifications | Replaced Simulink block |
---|---|---|---|---|---|
Matrix-by-vector multiplication | neon_mv_mul_u8x16 | uint8 |
| - | Product, Matrix Multiply |
neon_mv_mul_u16x8 | uint16 |
| |||
neon_mv_mul_u32x4 | uint32 |
| |||
Matrix-by-matrix multiplication | neon_mm_mul_u16x8 | uint16 |
| ||
neon_mm_mul_u32x4 | uint32 |
|