Embedded Target for Texas Instruments C6000 DSPs Previous page   Next Page

Creating Your Simulink Model for Targeting

You create real-time digital signal processing models the same way you create other Simulink models--by combining standard DSP blocks and C-MEX S-functions.

You add blocks to your model in several ways:

Once you have designed and built your model, you generate C code and build the real-time executable by clicking Build on the Real-Time Workshop pane of the Simulation Parameters dialog. The automatic build process creates the file modelname.out containing a real-time model image in COFF file format that can run on your target.

The file modelname.out is an executable whose format is target specific. You can load the file to your target and execute it in real time. Refer to your Real-Time Workshop documentation for more information about the build process.

Notes About Selecting Blocks for Your Models

Many blocks in the blocksets communicate with your MATLAB workspace. All the blocks generate code, but they do not work as they do on your desktop--they waste time waiting to send or receive data from your workspace, slowing your signal processing application without adding instrumentation value.

For this reason, we recommend you avoid using certain blocks, such as the Scope block and some source and sink blocks, in Simulink models that you use on Embedded Target for TI C6000 DSP targets. In the next table, we present the blocks you should not use in your target models.

Block Name/Category
Library
Description
Scope
Simulink, DSP Blockset
Provides oscilloscope view of your output. Do not use the Save data to workspace option on the Data history pane in the `Scope' parameters dialog.
To Workspace
Simulink
Return data to your MATLAB workspace.
From Workspace
Simulink
Send data to your model from your MATLAB workspace.
Spectrum Scope
DSP Blockset
Compute and display the short-time FFT of a signal. It has internal buffering that can slow your process without adding value.
To File
Simulink
Send data to a file on your host machine.
From File
Simulink
Get data from a file on your host machine.
Triggered to Workspace
DSP Blockset
Send data to your MATLAB workspace.
Signal To Workspace
DSP Blockset
Send a signal to your MATLAB workspace.
Signal From Workspace
DSP Blockset
Get a signal from your MATLAB workspace.
Triggered Signal From Workspace
DSP Blockset
Get a signal from your MATLAB workspace.
To Wave device
DSP Blockset
Send data to a .wav device.
From Wave device
DSP Blockset
Get data from a .wav device.
To Wave file
DSP Blockset
Send data to a .wav file.
From Wave file
DSP Blockset
Get data from a .wav file.

In general, using blocks to add instrumentation to your application is a valuable tool. In most cases, blocks you add to your model to display results or create plots, such as Histogram blocks, add to your generated code without affecting your running application.

When you need to send data to or receive data from your target, use the To Rtdx and From Rtdx blocks to accomplish the data transfer.


Previous page  Testing Your C6701 EVM C6701 EVM Tutorial 2-1--Single Rate Application Next page

Learn more about the latest releases of MathWorks products:

 © 1994-2010 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS