Target Language Compiler    

Code Architecture

Before investigating the specific code generation pieces of the Target Language Compiler (TLC), consider how Target Language Compiler generates code for a simple model. From the figure below, you see that blocks place code into Mdl routines. This shows MdlOutputs:

Blocks have inputs, outputs, parameters, states, plus other general properties. For example, block inputs and outputs are generally written to a block I/O structure (rtB). Block inputs can also come from the external input structure (rtU) or the state structure when connected to a state port of an integrator (rtX), or ground (rtGround) if unconnected or grounded. Block outputs can also go to the external output structure (rtY). The following picture shows the general block data mappings.

This discussion should give you a general sense of what the "block" object looks like. Now, you can look at the Target Language Compiler-specific pieces of the code generation process.


  Getting Started model.rtw and Target Language Compiler Overview