05750995
05750995
Abstract-In the development of new digital signal processing MATLAB from the CCS,also, you can put the data in
algorithms, Designers always use matlab simulation., when the MATLAB into CCS IDE.The relationship between
simulation results achieve the expected target, then chang the MATLAB, Embedded IDE LinkTM CC, CCS, and hardware
algorithms into C/C++ languages and debug on hardware DSP. target DSP shown in Figure 1.
There are some results of deviation because of design,
precision etc. Such a repeated process of revising all, will give MATLAB
developers inconvenience. This article takes designing FIR filter MATLAB Embedded IDE LinkTM CC
as an example to introduce method which use Embedded IDE Function calls and
LinkTM CC tool in Matlab7.6 environment to Debug data manipulation Debug RTDX
TMS320F2812 DSP board.
I. INTRODUCTION
Using Embedded IDE LinkTM CC tool provided by C2000/C5000/C6000 DSP
Matlab7.6 [1] environment , Developers can use some math
functions provided by Matlab7.6 to achieve data exchangs Figure 1
and storage between Matlab work space and target
DSP’memory. Using the embedded object oriented III. THREE WAYS OF MATLAB AND CCS IDE DATA
programming technology and Embedded IDE LinkTM CC EXCHANGE
tool in matlab,can do some operations such an reading and
writing arget registers and memories. Operations on CCS A . The connection object with the CCS IDE
and target DSP can be completed in matlab environment. Use this connection object to create a connection to
Designers can use strong visible data processing and CCS IDE and MATLAB. From the Matlab command
analysis functions to process and analyze DSP data. We can window ,run the application CCS, send or retrieve data to
combine CCS IDE and Matlab showing their respective DSP memory or register, Check the status of DSP, start and
advantages to enhance efficiency. stop programs that run on DSP.
II. FUNCTIONS AND FEATURES OF EMBEDDED IDE LINK B. RTDX (real-time data exchange) connection object[4]
TM
CC[2] It provides a real-time communication channel between
MATLAB and DSP hardware. Using this connection object,
Embedded IDE LinkTM CC tools Integrated in you can open, enable, turn off or disable the RTDX channel
MATLAB 7.6 connect TI development environment (CCS DSP. This channel can be used in real-time hardware target
IDE) and DSP hardware together. Allows developers operate DSP to send and retrieve data without having to stop running
on CCS and DSP hardware in MATLAB environment. It the program on the DSP. For example, send the raw data to
provides MATLAB, CCS and objectives of the DSP's the program for processing, and get the results back to
two-way connection. Developers can use MATLAB, a MATLAB workspace for analysis.
powerful visualization, data processing and analysis CCS RTDX connection object is actually a subclass of
functions to analyze and process data from CCS[3] and the connection object, create the CCS RTDX connection
DSP(C2000TM 、 C5000TM 、 C6000TM Series) target. object to create connection object at the same time, they can
This greatly simplifies the analysis of TI DSP software not create separately .
development, debug and validation process . Using
Embedded IDE LinkTM CC tool, you can transfer the data to C. Embedded Objects
736
750
f1 = 100; f2 = 300; f3 = 400;%three different frequency Raw data of three frequency components is
signals 100HZ/300HZ/400HZ 100HZ/300HZ/400HZ. The design of FIR low-pass filter
x = sin (2*pi*f1*[1:100]/fs)+sin (2*pi*f2*[1:100]/fs) + cutoff frequency is 250HZ, therefore filtered through
sin(2*pi*f3*[1:100]/fs); %signal is MATLAB and DSP leave the signal frequency components
%generated by three different frequency 100HZ only. By creating the out_buffer embedded object,
%signals and DSP filter results are sent to the MATLAB workspace
inp_buffer = createobj (cc,'INBUFFER');% input signal and the drawed, then the results are compared with the
%buffer to create the embedded object MATLAB filter results. Figure 6 and Figure 7 are the
%INBUFFER results of MATLAB and the DSP filter filtering the results.
out_buffer=createobj(cc,'OUTBUFFER');%input signal
%buffer to create the embedded
%object OUTBUFFER
b=createobj(cc,'B');%create an array of filter
%coefficients of the embedded object B
.........
.........
write (inp_buffer, x);%generate the signal data into the
%MATLAB DSP buffer
build (cc);% build the current project Figure 6. MATLAB Filter Results
load (cc, 'filter.out');% load filter.out to the target board
run (cc);% DSP program running
pause (5);% wait 5 seconds
halt (cc);% stop the DSP running
.........
.........
Filtering the original data is generated by MATLAB
three sinusoidal signals of different frequencies
and.Sampling frequency is 1000Hz,and the by creating an
embedded object with inp_buffer, the generated signal data
is stored into the MATLAB DSP buff. Figure 4 and Figure Figure 7. DSP filtering results displayed in the MATLAB environment
5 are respective MATLAB DSP filter input signal and the
input buffer data in MATLAB environment, the reality of
the results.
737
751
DSP system design tools have important application
value in the DSP system design has important
application value.
References
[1] Vinay K. Ingle Jonhn G. Proakis Digital Signal Processing -
Application of MATLAB. Beijing: Science Press, 2003.
[2] Liu Zhijian. MATLAB Application Program Interface User Guide [M].
Beijing: Science Press ,2004.
[3] Liu Yicheng. TMS320C54x DSP application design and development.
Beijing: Beijing Aerospace University Press, 2002.2.
[4] MATLAB Link for Code Composer studio Development Tools User's
Guide.Mathworks,2002.
[5] Sun Liming. TMS320F2812 principle of its C language program
development. Beijing: Tsinghua University Press ,20080.12.
[6] Li Zhen Fang, etc.. DSP-MATLAB debugging program development
and its direct target code generation. Xi'an: Xidian University Press,
2003.10.
738
752