Simulink Execution on the ARM7 target

From ConceptCar
Revision as of 20:22, 18 March 2009 by Donald (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A simulink model can be deployed on an embedded target when the Realtime Workshop and Embedded Coder plugins are used for Code creation.

Code/Model Execution Semantics

The execution semantic of a dataflow model is a continuous dataflow between the simulink blocks on the channels and each block is continuously processing its input data and generating output data. Since continuous execution is not feasible, it is approximated by updating the model in discrete steps. If the time distance between these steps is chosen small enough, the approximation is good enough.

Generated Code

The Embedded Coder produces code whose execution is triggered by 2 functions: 1. an initialization function, called once before model execution 2. a step function, called in a regular interval to update the model Interaction with the environment is done via the model's ports. The coder maps these to two structs, one for the inports and one for the outports.

Executing the Generated Code

The following pseudo-code illustrates how the generated code is executed: