Embedded Target for Texas Instruments C6000 DSPs    

Task 1--Export Filter by Generating a C Header File

In Task 1, you export a filter by generating a C header file. The generated C header file defines global arrays of filter coefficients that correspond to static memory locations in the final target program. By generating a program file from the C header file and loading the program file into your target, not only do you export your filter, but you ensure that you allocated enough memory for the exported filter coefficients. In Task 2, you write filter coefficients directly to the memory allocated in Task 1. You should complete Task 1 before starting Task 2.

Step 1--Open FDATool

Open FDATool by typing fdatool in the MATLAB command window.

FDATool opens with a default lowpass equiripple FIR filter that you export in this tutorial (you do not need to design a filter for this tutorial).

Step 2--Open the Export to Code Composer Studio (tm) IDE Dialog

Open the Export to CCS IDE dialog by selecting Targets -> Export to Code Composer Studio (tm) IDE from the FDATool menu bar.

Step 3--Set the Export Mode

Set Export mode to Generate C header file.

Step 4--Name the Filter Coefficient Variables

You must name the variables that store the filter coefficients in the generated C header file by setting the Numerator, Denominator, Numerator length, and Denominator length parameters. (These correspond to the four variables for the numerator filter coefficients, denominator filter coefficients, number of numerator coefficients, and number of denominator coefficients.) For this tutorial, use the default variable names, NUM, DEN, NL, and DL.

The generated C header file will define global arrays, NUM, DEN, NL, and DL, that correspond to static memory locations containing the filter coefficients in the final target program.

Step 5--Select a Data Type

Use the suggested data type to export your filter coefficients by selecting the Export suggested parameter.

Step 6--Select a Target

If you know the board number and processor number of your target DSP, select your target by setting the DSP Board # and DSP Processor # values.

Alternatively, click Select target..., which opens the Selection Utility: Link for Code Composer(tm) dialog. Select the board name and processor name of the DSP target and click Done. This automatically sets the DSP Board # and DSP Processor # values in the Export to CCS IDE dialog.

Step 7--Generate the C Header File

Click Apply to generate the C header file. This opens the generated C header file in CCS IDE. (CCS IDE will be opened for you if you did not have it open.)

Step 8--Export the Filter by Generating a Program File

Add the generated C header file to an appropriate project, generate a program file, and load the program file into your target DSP. The program file allocates static memory locations in the target, and writes the filter coefficients to these locations. See the following note.

By completing steps 1 through 8, you allocated target memory for the filter coefficients and exported the coefficients to these memory locations. Now you can tune the filter in FDATool, then export the updated filter coefficients directly to the allocated memory locations as described in Task 2 of this tutorial.

Contents of the C Header File Generated in Task 1


  Tutorial--Exporting Filters from FDATool to CCS IDE Task 2--Export Filter by Writing Directly to Target Memory