Main Content

Code Generation

Simulation acceleration, code generation, optimization for ARM® Cortex®-M Processors and ARM Cortex-A Processors

Generate C or C++ source code, or a MEX function from DSP System Toolbox™ signal processing algorithms using MATLAB® Coder™ and Simulink® Coder. To learn how to generate C code, see Understanding C Code Generation in DSP System Toolbox. In addition, you can generate code optimized for ARM Cortex-M Processors and ARM Cortex-A Processors using Embedded Coder®. For more information, see Code Generation for ARM Cortex-M and ARM Cortex-A Processors. You can also tune your algorithm parameters directly from MATLAB or Simulink in real time via the UI while your generated C code executes on the desktop.

DSP System Toolbox also supports SIMD code generation for certain MATLAB System objects and Simulink blocks. For more details, see SIMD Code Generation.

With the dspunfold function, you can generate a multithreaded MEX file, which leverages the multicore CPU architecture of the host computer. To use this function, you must have a MATLAB Coder license.

You can use MATLAB and Simulink for rapid prototyping of hardware designs. Certain DSP System Toolbox and DSP HDL Toolbox™ algorithms support HDL code generation when used with HDL Coder™. To find supported algorithms, see Find Blocks That Support HDL Code Generation. For digital filter designs in MATLAB, use Filter Design HDL Coder™ to generate HDL code and optimize filter implementation for hardware speed or area. For details, see Generate HDL Code for Filter System Objects (Filter Design HDL Coder). Both HDL Coder and Filter Design HDL Coder generate target-independent synthesizable Verilog™ and VHDL™ code for FPGA programming or ASIC prototyping and design.

Categories

Featured Examples