MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Uživatelská příručka Strana 187

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 386
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 186
Rapid Prototyping Program Framework
6-25
Rapid Prototyping Program Framework
Generating code for a Simulink model results in at least four files — model.c,
model.h, model.prm,andmodel.reg,wheremodel is the name of the Simulink
model. This code implements the model’s system equations, contains block
parameters, and performs initialization.
The Real-Time Workshop’s program framework provides the additional source
code necessary to build the model code into a complete, stand-alone program.
The program framework consists of application modules (files containing
source code to implement required functions) designed for a number of
different programming environments.
The automatic program builder ensures the program is created with the proper
modules once you have configured your template makefile.
The application modules and the code generated for a Simulink model are
implemented using a common API (application program interface). This API
defines a data structure (called a
SimStruct) that encapsulates all data for
your model. Note that the embedded-C target does not have a
SimStruct,but
does have a common calling syntax for model execution.
This API is similar to that of S-functions, with one major exception: the API
assumes that there is only one instance of the model, whereas S-functions can
have multiple instances. The function prototypes also differ from S-functions.
Rapid Prototyping Program Architecture
The structure of a real-time program consists of three components.Each
component has a dependency on a different part of the environment in which
the program executes. The following diagram illustrates this structure.
Zobrazit stránku 186
1 2 ... 182 183 184 185 186 187 188 189 190 191 192 ... 385 386

Komentáře k této Příručce

Žádné komentáře