Lab C: Assembly Programming - Texas Instruments C28 Series Student Manual

Dsp design workshop
Hide thumbs Also See for C28 Series:
Table of Contents

Advertisement

Lab C: Assembly Programming

Lab C: Assembly Programming
Objective
The objective of this lab is to practice and verify the mechanics of performing assembly language
programming arithmetic on the TMS320C28x. In this process we will expand upon the .asm file
from the previous lab to include new functions. Code will be to added to obtain the sum of the
products of the values from each array.
Perform the sum of products using a MAC-based implementation. In a real system application,
the coeff array may well be constant (values do not change), therefore one can modify the
initialization routine to skip the transfer of this arrays, thus reducing the amount of data RAM and
cycles required for initialization. Also, there is no need to copy the zero to clear the result
location. The initialization routine from the previous lab using the load/store operation will be
replaced with a looped BANZ implementation.
As in previous lab, consider which addressing modes are optimal for the tasks to be performed.
You may perform the lab based on this information alone, or may refer to the following
procedure.
Procedure
Copy Files, Create Project File
1. Create a new project called LabC.pjt in C:\C28x\Labs\Appendix\LabC and
add LabC.asm, and LabC.cmd to it. Check your file list to make sure all the files are
there. Be sure to setup the Build Options by clicking: Project
Options on the menu bar. Select the Linker tab. In the middle of the screen select
"No Autoinitialization" under "Autoinit Model:". Create a map file by
typing .\Debug\LabC.map in the Map Filename [-m] field. Enter start
in the "Code Entry Point (-e):" field. Next, select the Compiler tab. Note that
"Full Symbolic Debug (-g)" under "Generate Debug Info:" is
selected. Then select OK to save the Build Options.
Initialization Routine using BANZ
2. Edit LabC.asm and modify it by replacing the initialization routine using the load/store
operation with a BANZ process. Remember, it is only necessary to copy the first four
values (i.e. initialize the data array). Do you still need the coeff array in the vars section?
3. Save your work. If you would like, you can use Code Composer Studio to verify the
correct operation of the block initialization before moving to the next step.
Sum of Products using a RPT/MAC-based Implementation
4. Edit LabC.asm to add a RPT/MAC-based implementation to multiply the coeff array by
the data array and storing the final sum-of-product value to result.
C - 20
C28x - Appendix C - Assembly Programming
Build

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tms320c28 series

Table of Contents