Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: No
Publish Date: Apr 4, 2007


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Connecting to Texas Instruments DSPs Using the LabVIEW DSP Test Integration Toolkit

9 ratings | 4.33 out of 5
Print

Overview

Texas Instruments has incorporated a protocol called Real-Time Data Exchange (RTDX) that you can use to connect to your DSP code while it is running on a TI DSP. TI has recently integrated this technology on the company's C5000 and C6000 series DSPs. This article discusses how you can use the LabVIEW DSP Test Integration Toolkit for TI DSPs to develop DSP test systems for any of your DSP code that uses RTDX and standard LabVIEW programming.

Note: This toolkit is no longer officially supported by NI, but you can download the VIs that were included in this toolkit.

Connecting to a TI DSP

Texas Instruments has incorporated a protocol called Real-Time Data Exchange (RTDX) that you can use to connect to your DSP code while it is running on a TI DSP. TI has recently integrated this technology on the company’s C5000 and C6000 series DSPs. Prior to RTDX, testing DSPs required that you run your code, halt it, and then probe certain memory locations to determine the data values of the memory locations. This method can be tedious and does not provide appropriate real-time feedback of how the code is performing. The RTDX channels continuously send and receive data to and from the DSP without interrupting the execution of your code. As you can see, using RTDX provides you a much better understanding of how your code is performing.

To access these RTDX channels, you must write them into your DSP code using Code Composer Studio. Once this is complete, you can view these channel values using Code Composer Studio or use a third party tool, such as the one provided with the DSP Test Integration Toolkit, to read to and write from an RTDX channel.

Using LabVIEW to Connect to Your DSP


With the LabVIEW DSP Test Integration Toolkit for TI DSPs, you can develop DSP test systems for any of your DSP code that uses RTDX and standard LabVIEW programming. Since this toolkit makes it easy to develop a test system, you can build and modify different test scenarios earlier in the design of your code. Testing exposes many flaws and inefficiencies early in the design process, creating a better end-user experience by shortening the testing needed later in the design process. Finally, you can incorporate real-world signals from an arb, scope, or DAQ board into your test system, making only minimal changes in your overall code.

Using RTDX VIS to Send and Receive Data from a DSP


As mentioned earlier, you must write RTDX channels into your DSP code using Code Composer Studio before you can access them in LabVIEW. Once you have implemented the channels, you can use the RTDX VIs with the DSP Test Integration Toolkit to communicate to your DSP. With the RTDX tools for LabVIEW, you can read and write scalars and arrays of integers, including 8 16, and 32-bit, and floating-point single and double precision numbers. Just like in regular LabVIEW programming, you should use error clusters to control program execution.

To write data to an RTDX channel, you need to know the RTDX channel name that you configured in the Code Composer Studio source code. When you wire the channel name and data into the Write VIs, LabVIEW sends the data directly to the RTDX channel. Similarly, to read from an RTDX channel, you must know the RTDX channel that you implemented in your Code Composer Studio source code.

Continuously Reading and Writing Data with Your DSP


When communicating to your DSP using RTDX, you may want to send streaming arrays of data or continually send data points one at a time. To receive information on the real-time performance behavior of your code, it is not only important that your DSP code continues to run, but it is also important that you continually send data through your RTDX channels. To accomplish this, you can place all of your RTDX code in LabVIEW in a While Loop.

A simple example illustrates how DSP code receives an input signal, applies filter coefficients to the signal, and then outputs the resulting signal. You can test your code for you filter easily by creating three RTDX channels, including:

Channel Name Channel Function
Signal In Input signal to be filtered
Coeffs Filter coefficients to be applied to Signal In
Signal Out Signal resulting from filtering

Once you have configured these channels in Code Composer Studio, you can use the LabVIEW DSP Test Integration toolkit to download and run the file. For more information on automating Code Composer Studio, see the on-line application note, Automating File Management with the LabVIEW DSP Test Integration Toolkit for TI DSP. Once you have access to each of these RTDX channels, you can easily implement them in LabVIEW, as shown in Figure 1.


Figure 1. Block Diagram of a LabVIEW program that sends a signal to the DSP, processes the signal based on the Filter Coefficients sent, and returns the processed signal.

To send the continuous input signal to an RTDX channel, you can wire a Basic Function Generator (Functions>>Analyze>>Waveform Generation) to a RTDX Write array VI, placing that code inside a While Loop. The VI sends a continuous signal, resulting in a continuous signal through the RTDX channel "Signal In."

Applying the filter coefficients is very similar to sending the input signal because you are continuously writing an array of data to an RTDX channel. You can use the FIR Windowed Coefficients VI (Functions>>Analyze>>Signal Processing>>Filters>>Advanced FIR Filters) to generate our filter coefficients. You can wire the output from this VI into another RTDX write array to send these coefficients to the channel "Coeffs."

Continuously receiving the output signal from the RTDX channel "Signal Out" is similar to writing data to "Signal In." By placing the RTDX read array VI inside the While Loop, you can continuously read the signal. Once you receive this output signal, you can use more of the LabVIEW analysis tools for any further signal processing.

Once the VIs are in the while loop, you can control the order they execute by wiring the error clusters.

Integrating Real-World I/O into Your DSP Test


Once you have your VI built using RTDX, implementing real-world I/O is straight forward. You can use an arb, digitizer, or data acquisition board to supply your input signal and receive your output signal as shown in Figure 2. You also need to ensure your DSP device has connections for external hardware. You can implement the actual filter coefficients into your code or continue to use the RTDX channel "Coeffs" to transfer the filter coefficients to your DSP.


Figure 2. Connecting Real-World I/O to a DSP development board

Integrating real-world I/O into your DSP test involves the following modifications to your LabVIEW code:
  • Replacing the RTDX write VI for "Signal In" with the appropriate code to send in the signals from your external hardware (e.g. an analog output VI to output a signal from a DAQ board to your DSP)
  • Replacing the RTDX read VI for "Signal Out" with the appropriate code to retrieve the signal to your external hardware (e.g. an analog input VI to input a signal from the DSP to your DAQ board)
Related Links:
More Tutorials and Example Programs
See How LabVIEW Connects to Other Third Party Design Tools
9 ratings | 4.33 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). National Instruments does not support this tutorial or guarantee its quality in any way. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).