Chapter 14 Lecture Notes

14
Introduction
Simulink
Embedded Target
Introduction
The MATLAB link to Code Composer Studio (CCS) is the first
layer in allowing MATLAB to communinicate with CCS. A second product, known as the Embedded Target for the TI
TMS320C6000 DSP Platform, interfaces through MATLAB
SimulinkTM and Real-Time Workshop (RTW), to allow block
diagrams created in Simulink to be exported and downloaded
directly to the 6711 and 6713 DSK’s.
• RTW is responsible for generating ANSI C from a Simulink
block diagram
• The CCS link allows MATLAB to communicate with Code
Composer, and create a CCS project that upon code build
produces an .out file that can be downloaded and run on a
DSK target
For this course, using cut-and-paste Simulink blocks to create
real-time DSP applications, would defeat the detailed learning
experience this course is all about. Still, being aware of options
such as this for rapid prototyping may be of value in future work
experiences.
ECE 5655/4655 Real-Time DSP
14–1
Chapter 13 • Simulink Embedded Target
The Toolbox
There are many blockset libraries available for Simulink. Of particular interest here are:
• C6000 Target
• DSP blockset
• Fixed-point block set
C6000 Target Blocks
13–2
ECE 5655/4655 Real-Time DSP
The Toolbox
DSP Blockset
ECE 5655/4655 Real-Time DSP
14–3
Chapter 13 • Simulink Embedded Target
Fixed-point Blockset
Examples
A variety of examples com with the SImulink C6000 Target
blockset. A automatic gain control example for the C6713 DSK
is shown below.
13–4
ECE 5655/4655 Real-Time DSP
ECE 5655/4655 Real-Time DSP
Reset
C6713 DSK
ADC
Line In
C6713 DSK
ADC
Audio Input
Info
Pwr Goal
Output Pwr
Input Power (dB)
Output Power (dB)
Click "Info" for a full description of the algorithm
and detailed instructions.
When the generated code has been compiled
and linked, double-click "Run" to execute the code
and initiate the RTDX transfers.
Multiplex
Signals
M ode l
Se ttings
DAC
C6713 DSK
DAC
Speaker Output
Check Setpoint
Value
Type Ctrl-B to build using default settings, or
double-click "Model Settings" to change model
parameters before typing Ctrl-B.
How to use this demo:
Compute
Power
AGC feedback
compensator
Signal In
AGC Cont.
Product
C6713 DSK
Automatic Gain Control
Run
To RTDX
To RTDX
ochan1
From RTDX
From RTDX
ichan1
SETPOINT
Examples
14–5
13–6
-1
z
-1
z
Integer Delay
Output
Pwr
10
u
Downsample
1
Convert back
to voltage
AGC
Integer Delay1
AGC Control
2
AGC
Cont.
1
Loop Filter
FDATool
Loop
Gain
0.25
Power in dB
Signal to dB
dB
To
Sample
Setpoint to dB
2
dB
Pwr Goal
Variance
1
Signal
In
VAR
Chapter 13 • Simulink Embedded Target
AGC Detail
ECE 5655/4655 Real-Time DSP