Technical data
Target Language Compiler Architecture
3-7
Program flow through the system target files avoids multiple passes through 
the RTW file. You should not change the order of code generation without first 
performing a thorough analysis of the file dependencies. For example, the 
parameters structure is not created until all source code has been generated. 
This technique eliminates unused parameters.
Block Functions
The functions declared inside each of the block target files are exercised by the 
system target files. In these tables, 
block refers to a Simulink block name (e.g., 
gain) and system refers to the subsystem in which the block resides.
In object-oriented programming terms, these functions are polymorphic in 
nature since each block target file contains the same functions. The Target 
Language Compiler dynamically determines at runtime which block function 
to execute depending on the block’s type. That is, the system file only specifies 
that the 
Outputs function, for example, is to be executed. The particular 
Outputs function is determined by the Target Language Compiler depending 
on the block’s type.
Table 3-2: Block Functions Exercised by mdlwide.tlc
BlockInstanceSetup(block, system)
BlockTypeSetup(block, system)
Table 3-3: Block Functions Exercised by mdlbody.tlc
Enable(block, system)
Disable(block, system)
Start(block, system)
InitializeConditions(block, system)
Outputs(block, system)
Update(block, system)
Derivatives(block, system)
Terminate(block, system)










