Main Content

Code Generation

Simulation acceleration, code generation, optimization forARM®皮质®-M Processors手臂皮层-A Processors

Generate C or C++ source code, or a MEX function from DSP System Toolbox™ signal processing algorithms usingMATLAB®编码器™万博1manbetx®编码器. To learn how to generate C code, seeUnderstanding C Code Generation in DSP System Toolbox. In addition, you can generate code optimized for手臂皮层-M Processors手臂皮层-A Processorsusing Embedded Coder®. For more information, seeCode 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 using Intel AVX2 technology for certain MATLAB System objects and Simulink blocks. For more details, seeSIMD Code Generation.

With thedspunfoldfunction, you can generate a multithreaded MEX file, which leverages the multicore CPU architecture of the host computer. To use this function, you must have aMATLAB Coderlicense.

You can use MATLAB and Simulink for rapid prototyping of hardware designs. Some DSP System Toolbox algorithms support HDL code generation when used with HDL Coder™. To find supported algorithms, seeFind 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, seeGenerate HDL Code for Filter System Objects(过滤器设计HDL编码器). Both HDL Coder and Filter Design HDL Coder generate target-independent synthesizable Verilog™ and VHDL™ code for FPGA programming or ASIC prototyping and design. They also generate scripts and test benches for use with third-party HDL simulators.

Featured Examples