Embedded Target for Texas Instruments C6000 DSPs    

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. Using these blocks can slow your model when you them on your target because they do nothing on the target except use time. All the blocks will 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.

In general, using blocks to instrument your application is a valuable tool. In most cases, blocks that you add to display results or create plots, such as Histogram blocks, add to your generated code without affecting your running application. However, the blocks in Table 2-3, Blocks to Avoid in Models for Embedded Target for TI C6000 DSP Targets, generate code and perform operations that do not add value to your running application.

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

For this reason, we recommend that 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.

Table 2-3: Blocks to Avoid in Models for Embedded Target for TI C6000 DSP Targets
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.


  Testing Your C6701 EVM C6701 EVM Tutorial 2-1--Single Rate Application