User`s guide

3 Working with Real-Time Workshop
3-4
The Generic Real-Time Target
Real-Time Workshop provides a generic real-time development target. The
GRT target provides an environment for simulating fixed-step models in
single or multitasking mode. A program generated with the GRT target runs
your model, in simulated time, as a stand-alone program on your workstation.
The target supports external mode, allowing your application to compute
outputs and send them back to Simulink for you to view.
The GRT target allows you to perform code verification by logging system
outputs, states, and simulation time to a data file. The data file can then be
loaded into the MATLAB workspace for analysis or comparison with the
output of the original model.
The GRT target also provides a starting point for targeting custom hardware.
You can modify the GRT harness program,
grt_main.c, to execute code
generated from your model at interrupt level under control of a real-time
clock.
Target Language Compiler Files
Real-Time Workshop generates source code for models and blocks through
the Target Language Compiler, which reads script files (or TLC files) that
specify the format and content of output source files. Two types of TLC files
are used:
A system target file, which describes how to generate code for a chosen
target, is the entry point for the TLC program that creates the executable.
Block target files define how the code looks for each of the Simulink blocks
in your model.
System and block target files have the extension
.tlc. By convention, a
system target file has a name corresponding to your target. For example,
grt.tlc is the system target file for the GRT target.
If you need to incorporate legacy code or maximize the efficiency of code for
models containing S-functions, you will need to prepare your own TLC files to
augment code generation for such models. These and other advanced uses of
TLC scripts are explained in the Target Language Compiler Reference Guide.