Supported Simulink Blocks with CMSIS Library for ARM Cortex-A Processors
Embedded Coder® Support Package for ARM® Cortex®-A Processors provides a code replacement library (CRL), ARM Cortex-A CMSIS, to generate calls to the CMSIS-DSP library optimized for ARM Cortex-A processors.
For more information on the CMSIS-DSP library, see https://github.com/ARM-software/CMSIS-DSP.
To improve the speed of your models and the performance of the generated code, you can set the model configuration parameters under Code Generation > Optimization. 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
halfdata type.When the ARM Cortex-A CMSIS CRL does not provide code replacements because the input vector length being below the threshold, you can enable CMSIS function generation for all input lengths. To enable this option, set the environment variable
DISABLE_ARMCORTEXA_CMSIS_CRL_THRESHOLDSto true using the following command:setenv('DISABLE_ARMCORTEXA_CMSIS_CRL_THRESHOLDS','true')To generate optimized code, thresholds are introduced . Forcing CMSIS function generation for all input lengths using this command can degrade performance.
Basic Math Operations
| Operation | Wrappers Calling CMSIS Function | Supported Data Types | Input/Output Specifications | Parameter Specifications | Replaced Simulink® Block |
|---|---|---|---|---|---|
| Element-wise real addition |
|
|
| - | Sum |
| Real vector offset |
| ||||
| Element-wise real subtraction |
|
|
| - | Sum |
| Element-wise 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 block
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 | Wrappers Calling CMSIS Function | Supported Data Types | Input/Output Specifications | Parameter specifications | Replaced Simulink Block |
|---|---|---|---|---|---|
| Matrix multiplication |
|
|
| - | Product, Matrix Multiply |
| Complex matrix multiplication |
|
|
| - | Product, Matrix Multiply |
| Matrix transpose |
|
|
| - | Transpose |
| Complex matrix transpose |
|
|
| - | Transpose |
| 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 |
|
See Also
Supported MATLAB Functions with CMSIS Library for ARM Cortex-A Processors