Target Language Compiler    

Chapter 2
Getting Started


Code Architecture

Before investigating the specific code generation pieces of the Target Language Compiler, consider how TLC 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 TLC-specific pieces of the code generation process.


 Where to Go from Here Model.rtw and TLC Overview