Main Content

Use Products and Blocks Supported for Code Generation

As you construct a model, to prevent issues later in the development process and potential rework, determine whether the code generator supports products and blocks that you want to use.

Related Products

The following table summarizes MathWorks® products that extend and complement Simulink® Coder™ software. For information about these products and how they support code generation, see the product-specific documentation at www.mathworks.com.

ProductExamples of Code Generation Applications

Aerospace Blockset™

Aircraft, spacecraft, rocket, propulsion systems, and unmanned airborne vehicles

Audio Toolbox™

Audio processing systems
Automated Driving Toolbox™Designing, simulating, and testing ADAS and autonomous driving systems
AUTOSAR BlocksetModeling and simulation of AUTOSAR Classic and Adaptive ECU software

Communications Toolbox™

Physical layer of communication systems

Computer Vision Toolbox™

Video processing, image processing, and computer vision systems

Control System Toolbox™

Linear control systems

DSP System Toolbox™

Signal processing systems
Embedded Coder®Embedded systems, rapid prototyping boards, and microprocessors in mass production

Fixed-Point Designer™

Fixed-point systems

Fuzzy Logic Toolbox™

System designs based on fuzzy logic
HDL Verifier™

Direct programming interface (DPI) component and transaction-level model (TLM) generation from Simulink

IEC Certification Kit

ISO 26262 and IEC 61508 certification

Model-Based Calibration Toolbox™

Developing processes for systematically identifying optimal balance of engine performance, emissions, and fuel economy, and reusing statistical models for control design, hardware-in-the-loop (HIL) testing, or powertrain simulation

Model Predictive Control Toolbox™

Model predictive controllers
Deep Learning Toolbox™Neural networks
Parallel Computing Toolbox™Parallel builds for large Simulink models
Phased Array System Toolbox™Sensor array systems in radar, sonar, wireless communications, and medical imaging applications
Polyspace® Bug Finder™

MISRA-C compliance and static analysis of generated code

Polyspace Code Prover™

Formal analysis of generated code

Powertrain Blockset™

Real-time testing of powertrain applications

RF Blockset™Design, simulate, and analyze radio frequency (RF) systems
Robotics System Toolbox™

Design, simulate, and test robotics applications

ROS Toolbox

Design, simulate, and deploy ROS-based applications

Simscape™

Systems spanning mechanical, electrical, hydraulic, and other physical domains as physical networks

Simscape Driveline™

Driveline (drivetrain) systems
Simscape Electrical™Electronic, electromechanical, and electrical power systems

Simscape Fluids™

Hydraulic power and control systems

Simscape Multibody™

Three-dimensional mechanical systems

Simulink 3D Animation™

Systems with 3D visualizations
Simulink Check™Model standards compliance checking and metrics
Simulink Code Inspector™

Automated reviews of generated code

Simulink Control Design™Autotuning of PID controllers and online frequency response estimation
Simulink Coverage™Model and code structural coverage analysis

Simulink Design Optimization™

Tuning adaptive lookup tables and checking signal characteristics

Simulink Desktop Real-Time™

Rapid prototyping or hardware-in-the-loop (HIL) simulation of control system and signal processing algorithms

Simulink Real-Time™

Rapid control prototyping, hardware-in-the-loop (HIL) simulation, and other real-time testing applications

Simulink Report Generator™

Automatically generating project documentation in a standard format
Requirements Toolbox™Authoring and tracing requirements to design and code
Simulink Test™

Software-in-the-loop (SIL), processor-in-the-loop (PIL), and real-time hardware-in-the-loop (HIL) testing of generated code

SoC Blockset™Designing, evaluating, and implementing SoC hardware and software architectures
Stateflow®State machines and flow charts

System Identification Toolbox™

Systems identified from measured input-output data
Vehicle Dynamics Blockset™Modeling and simulation of vehicle dynamics in 3D environment

Vehicle Network Toolbox™

CAN blocks for Accelerator and Rapid Accelerator simulations and code deployment on Windows®

Blocks Supported for Code Generation

You can generate efficient code for a subset of Simulink built-in blocks and product-specific blockset blocks. The following tables list these blocks. In the tables, an information The letter "i" inside a blue rectangle. icon before the name of a block indicates that specific usage notes or limitations apply to code generation for that block. To view the usage notes and limitations, in the corresponding reference page, scroll down to the Extended Capabilities section at the bottom of the page and expand the C/C++ Code Generation section.

Simulink also provides a web page that summarizes characteristics of Simulink built-in blocks. The content, which is sourced from the Simulink block library, identifies blocks that are not recommended for production code generation and gives other usage guidelines. To view the page, in the MATLAB® Command Window, type showblockdatatypetable.

For detailed information about a block, see the block reference page.

For modeling guidelines regarding blocks, see Modeling Guidelines for Blocks.

Block Set Support for Code Generation

Several products that include blocks are available for you to consider for code generation. However, before using the blocks for one of these products, consult the documentation for that product to confirm which blocks support code generation.