Block Authoring and Customization

Define code generation behavior for user-defined blocks

Represent external code using an API that interacts with the Simulink® engine. Using S-functions you can integrate existing C (or C++) functions, such as device drivers, lookup tables, and general functions and interface.

Customize generated code to improve memory requirements and execution speed. Using the Target Language Compiler, you can write a target for your C MEX S-function to inline the S-function. Inlining an S-function incorporates the S-function block's code into the generated code for the model, reducing overhead.

  • S-Functions
    Develop S-function to represent external code and inline S-function with Target Language Compiler (TLC) block target file
  • Target Language Compiler
    Define block code generation behavior using Target Language Compiler