Real-Time Workshop    

Introduction

Real-Time Workshop generates two styles of code. One code style is suitable for rapid prototyping (and simulation via code generation). The other style is suitable for embedded applications. This chapter discusses the program architecture, that is, the structure of code generated by Real-Time Workshop, associated with these two styles of code. The table below classifies the targets shipped with Real-Time Workshop. For related details about code style and target characteristics, see Choosing a Code Format for Your Application.

Table 7-1: Code Styles Listed By Target  
Target
Code Style (using C unless noted)
Real-Time Workshop Embedded Coder target
Embedded -- useful as a starting point when using the generated C code in an embedded application.
Generic real-time (GRT) target
Rapid prototyping -- nonreal-time simulation on your workstation. Useful as a starting point for creating a rapid prototyping real-time target that does not use real-time operating system tasking primitives. Also useful for validating the generated code on your workstation.
Real-time malloc target
Rapid prototyping -- very similar to the generic real-time (GRT) target except that this target allocates all model working memory dynamically rather than statically declaring it in advance.
Rapid simulation target
Rapid prototyping -- nonreal-time simulation of your model on your workstation. Useful as a high-speed or batch simulation tool.
S-function target
Rapid prototyping -- creates a C-MEX S-function for simulation of your model within another Simulink model.
Tornado (VxWorks) real-time target
Rapid prototyping -- runs model in real time using the VxWorks real-time operating system tasking primitives. Also useful as a starting point for targeting a real-time operating system.
Real-Time Windows target
Rapid prototyping -- runs model in real-time at interrupt level while your PC is running Microsoft Windows in the background.
xPC target
Rapid prototyping -- runs model in real time on target PC running xPC kernel.
DOS real-time target
Rapid prototyping -- runs model in real time at interrupt level under DOS.

Third-party vendors supply additional targets for Real-Time Workshop. Generally, these can be classified as rapid prototyping targets. For more information about third-party products, see the MATLAB Connections Web page: http://www.mathworks.com/products/connections.

This chapter is divided into three sections. The first section discusses model execution; the second section discusses the rapid prototyping style of code; and the third section discusses the embedded style of code.


  Program Architecture Model Execution