Main Content
Block Replacement
Define code replacement mappings for Simulink® blocks
Replace the code generated from specific Simulink blocks with custom implementation code. For computationally intensive blocks, you can replace default generated code with custom implementations such as library functions that are optimized for your target hardware.
Classes
RTW.TflBlockEntry | Create block replacement entry (Since R2024a) |
Functions
RTW.BlockProperty | Create a block property specification for a block replacement entry (Since R2024a) |
Objects
RTW.CImplementation | Specify implementation function for a block replacement entry (Since R2024a) |
Topics
- Block Replacement for Code Optimization
Customize how and when the code generator replaces C/C++ code that it generates for Simulink blocks.
- Replace Code Generated from Discrete FIR Filter Blocks
Define code replacement mappings that replace code generated from filter blocks.
- Use Derived Data in Replacement Code Implementations
Define how implementation code uses data derived from block inputs, outputs, and parameters.