Skip to Main Content Skip to Search
Home |   Select Country  Choose Country  |  Contact Us  |  Cart Store 
Create Account | Log In
Products & Services Industries Academia Support User Community Company

 

Newsletters - MATLAB News & Notes

Design and Deploy Algorithms on
Texas Instruments DSP:

Using Simulink and MATLAB
with New Developer's Kit

by Dave Koh and Don Orofino

The newly released Developer's Kit for Texas Instruments DSP unites MATLAB, Simulink, and the code generation capabilities of Real-Time Workshop® with TI's Code Composer StudioTM IDE to provide DSP software/systems architects with a unique suite of tools for every phase of the DSP development cycle.

Code Composer Studio (CCS) has been interfaced with the MATLAB environment through a set of link functions that provide direct communication between the two applications. This interoperability lets you conduct remote debug sessions; view and modify DSP memory and registers; and communicate real-time data with a running application on the target DSP from the MATLAB workspace.

With the Developer's Kit, target DSP code can be generated from a Simulink model, compiled, linked, loaded, and executed on a TI C6701 Evaluation Module (EVM) DSP board with a literal click-of-a-button. By automating hand coding, debugging prototype algorithms, and exporting target results for analysis, the Developer's Kit compresses the traditional development cycle.

Product Components

The Developer's Kit for Texas Instruments DSP offers four tightly-coupled suites of automation tools, as represented in Figure 1:


Figure 1
1. Link for Code Composer Studio IDE
2. Link for Real-Time Data Exchange (RTDXTM) Interface
3. Target for Code Composer Studio IDE
4. Target for C6701 EVM

Components of the Developer's Kit can be partitioned into two categories: remote automation links from the MATLAB workspace, and targeting capability from Simulink models. The targeting components include a C6701 EVM blockset library that contains ADC and DAC blocks, and a block that controls the on-board LED indicators. These blocks let you configure the EVM peripheral devices via memory-mapped I/O and set run-time behavior such as sample rate and data word sizes. As shown in Figure 2, the EVM library can be used with other Simulink libraries, such as the DSP Blockset, to construct models from which C6701 EVM-specific source code can be generated.

A model may be easily retargeted from the EVM hardware to the Code Composer Studio IDE by changing targeting options in the model configuration graphical user interface (GUI).

When the Target for C6701 EVM option is selected, Simulink invokes Real-Time Workshop to initiate code generation. Real-Time Workshop translates the Simulink model into EVM-specific, floating-point ANSI C code, producing the appropriate source and header files. The source code is then compiled by the TI C6000 compiler and linked with appropriate libraries. The resulting executable image (a COFF file) is downloaded and run on the target DSP.


Figure 2

Figure 3

The Target for CCS IDE option creates a Code Composer Studio project consisting of Real-Time Workshop generated, C6701 EVM-specific ANSI C code and all required libraries, such as the C6000 and RTDX run-time libraries (see Figure 3). Code Composer Studio is launched and the project file is loaded by the targeting process, eliminating the need to create a project file manually.

Once the algorithm has been verified with successful execution on the EVM using Target for C6701EVM, the prototyping process has completed, and the second category of components-automation links to CCS IDE and RTDX-lets users optimize and polish their final target application.


Using Windows COM interface technology, the link components communicate control and data information between MATLAB, CCS, and the target DSP (which, for the link components, may be any TI C5000 or C6000 processor). The link functions are extensions to the MATLAB language, and enable you to write complex M-file scripts to perform automated CCS debug tasks and exchange real-time data with the running target DSP (see Figure 4).

The Link for CCS IDE may be most effective during the fine-tuning phase of the DSP application development cycle. It may be desirable to hand-optimize sections of prototype target DSP code and tune run-time algorithm parameters, such as digital filter coefficients. Once a CCS IDE project file is created, whether manually or automatically with Target for CCS IDE, Link for CCS IDE may be used to load the project file into CCS IDE and to perform various debugging functions. Executed from the MATLAB command line or run as M-file scripts, a typical debugging sequence can run the target DSP to a breakpoint, read a block of memory into a MATLAB workspace variable, edit data, write data back to a block of DSP memory, and run to the next breakpoint.

Figure 4

The Link for RTDX Interface exploits TI's eXpressDSPTM technology to provide streaming real-time data transfer between the MATLAB workspace and the target DSP without halting the target application. Synthetic data can be generated and injected into the running application, parameters can be tuned "on-the-fly," and target DSP results can be compared with simulation results or displayed by any of MATLAB's graphical tools in real time.

With the Link for RTDX Interface, you can construct elaborate hardware-in-the-loop (HIL) simulations using the MATLAB language to predict real-world, real-time behavior of the candidate production-ready, target DSP application.

Note that both link interfaces not only support code generated by the Developer's Kit and Real-Time Workshop, but also any C5000 and C6000 application code written manually or developed by a third-party vendor.

The Developer's Kit also has a plug-in for the Filter Design and Analysis Tool (FDATool) that ships with the Signal Processing Toolbox (see figure below).


This figure shows the FDATool, along with the plug-in for downloading filter coefficients.

Plug-in for Extending FDATool

The Developer's Kit for Texas Instruments DSP extends FDATool via a plug-in that enables the GUI to communicate filter coefficients directly to the Code Composer IDE. The GUI can generate ANSI C code containing the filter coefficients, using well-defined data structures for each supported filter architecture.

The plug-in also lets FDATool communicate directly with a target DSP via CCS, so that a newly designed or updated filter can be immediately downloaded to the DSP hardware. This can greatly reduce the design cycle for DSP engineers. More information on FDATool can be found online at www.mathworks.com/products/signal.

For more information on the Developer's Kit for Texas Instruments DSPs,
or to purchase this product online, visit: www.mathworks.com/products/tic6000.

Contact sales
E-mail this page
Print this page
Subscribe to newsletters