Real-Time Workshop | ![]() ![]() |
Application modules -- With respect to Real-Time Workshop program architecture, these are collections of programs that implement functions carried out by the system dependent, system independent, and application components.
Atomic subsystem -- A subsystem whose blocks are executed as a unit before moving on. Conditionally executed subsystems are atomic, and atomic subsystems are nonvirtual. Unconditionally executed subsystems are virtual by default, but can be designated as atomic. Real-Time Workshop can generate reusable code only for nonvirtual subsystems.
Block target file -- A file that describes how a specific Simulink block is to be transformed to a language such as C, based on the block's description in the Real-Time Workshop file (model
.rtw
). Typically, there is one block target file for each Simulink block.
Code reuse -- An optimization whereby code generated for identical nonvirtual subsystems is collapsed into one function that is called for each subsystem instance with appropriate parameters. Code reuse, along with expression folding, can dramatically reduce the amount of generated code.
Embedded Real-Time (ERT) target - A target configuration that generates model code for execution on an independent embedded real-time system. Requires Real-Time Workshop Embedded Coder.
Expression folding -- A code optimization technique that minimizes the computation of intermediate results at block outputs and the storage of such results in temporary buffers or variables. It can dramatically improve the efficiency of generated code, achieving results that compare favorably to hand-optimized code.
File extensions -- The table below lists the file extensions associated with Simulink, the Target Language Compiler, and Real-Time Workshop.
Generic Real-Time (GRT) target -- A target configuration that generates model code for a real-time system, with the resulting code executed on your workstation. (Note that execution is not tied to a real-time clock.) You can use GRT as a starting point for targeting custom hardware.
Host system -- The computer system on which you create and may compile your real-time application.
Inline -- Generally, this means to place something directly in the generated source code. You can inline parameters and S-functions using Real-Time Workshop.
Inlined parameters (Target Language Compiler Boolean global variable: InlineParameters
) -- The numerical values of the block parameters are hard coded into the generated code. Advantages include faster execution and less memory use, but you lose the ability to change the block parameter values at run-time.
Inlined S-function -- An S-function can be inlined into the generated code by implementing it as a .tlc
file. The code for this S-function is placed in the generated model code itself. In contrast, noninlined S-functions require a function call to S-function residing in an external MEX-file.
Interrupt Service Routine (ISR) -- A piece of code that your processor executes when an external event, such as a timer, occurs.
Loop rolling (Target Language Compiler global variable: RollThreshold
) -- Depending on the block's operation and the width of the input/output ports, the generated code uses a for
statement (rolled code) instead of repeating identical lines of code (flat code) over the signal width.
Make -- A utility to maintain, update, and regenerate related programs and files. The commands to be executed are placed in a makefile.
Makefiles -- Files that contain a collection of commands that allow groups of programs, object files, libraries, etc., to interact. Makefiles are executed by your development system's make utility.
Multitasking -- A process by which your microprocessor schedules the handling of multiple tasks. The number of tasks is equal to the number of sample times in your model.
Noninlined S-function -- In the context of Real-Time Workshop, this is any C MEX S-function that is not implemented using a customized .tlc
file. If you create an C MEX S-function as part of a Simulink model, it is by default noninlined unless you write your own .tlc
file that inlines it.
Nonreal-time -- A simulation environment of a block diagram provided for high-speed simulation of your model. Execution is not tied to a real-time clock.
Nonvirtual block -- Any block that performs some algorithm, such as a Gain block. Real-Time Workshop generates code for all nonvirtual blocks, either inline or as separate functions and files, as directed by users.
Pseudomultitasking -- n processors that do not offer multitasking support, you can perform pseudomultitasking by scheduling events on a fixed time-sharing basis.
Real-time model data structure -- Real-Time Workshop encapsulates information about the root model in the real-time model data structure, often abbreviated as rtM. rtM contains global information related to timing, solvers, and logging, and model data such as inputs, outputs, states, and parameters.
Real-time system -- A computer that processes real-world events as they happen, under the constraint of a real-time clock, and which may implement algorithms in dedicated hardware. Examples include mobile telephones, test and measurement devices, and avionic and automotive control systems.
Run-time interface -- A wrapper around the generated code that can be built into a stand-alone executable. The run-time interface consists of routines to move the time forward, save logged variables at the appropriate time steps, etc. The run-time interface is responsible for managing the execution of the real-time program created from your Simulink block diagram.
S-function -- A customized Simulink block written in C, Fortran, or M-code. Real-Time Workshop can target C-code S-functions "as is" or users can inline C-code S-functions through preparing TLC scripts for them.
Simstruct -- A Simulink data structure and associated application programming interface (API) that enables S-functions to communicate with other entities in models. Simstructs are included in code generated by Real-Time Workshop for noninlined S-functions.
Singletasking -- A mode in which a model runs in one task.
System target file -- The entry point to the Target Language Compiler program, used to transform the Real-Time Workshop file into target specific code.
Target file -- A file that is compiled and executed by the Target Language Compiler. The block and system target TLC files used specify how to transform the Real-Time Workshop file (model
.rtw
) into target-specific code.
Targeting -- The process of creating software modules appropriate for execution on your target system.
Target Language Compiler (TLC) -- A program that compiles and executes system and target files by translating a model
.rtw
file into a target language by means of TLC scripts and template makefiles.
Target Language Compiler program -- One or more TLC script files that describe how to convert a model
.rtw
file into generated code. There is one TLC file for the target, plus one for each built-in block. Users can provide their own TLC files in order to inline S-functions or to "wrap" existing user code.
Target system -- The specific or generic computer system on which your real-time application executes.
Template makefile -- A line-for-line makefile used by a make utility. The template makefile is converted to a makefile by copying the contents of the template makefile (usually system.tmf
) to a makefile (usually system.mk
) replacing tokens describing your model's configuration.
Task identifier (tid) -- In generated code, each sample rate in a multirate model is assigned a task identifier (tid
). The tid
is passed to the model output and update routines to control which portion of your model should execute at a given time step. Single-rate systems ignore the tid
.
Virtual block -- A connection or graphical block, for example a Mux block, that has no algorithmic functionality. Virtual blocks incur no real-time overhead as no code is generated for them.
![]() | DSP Processor Support | Blocks That Depend on Absolute Time | ![]() |