<< Chapter < Page Chapter >> Page >
This is the lab assignment portion for the Assembly Programming lab.

Introduction

The purpose of this lab is to help you become familiar with the internal CPU of the 'C6713 processor. Programs are written in assembly. The first program is very simple so that you can make sure you know how to write an assembly program and debug it. The other two programs are a little more involved and help you understand the multiply and sum algorithm, delay slots and parallel instructions.

Part 1

  • Make a new project titled lab1 using the 'C6713 Simulator.
  • Write a program in assembly that multiplies the two constants 0x35 and 0x10. You will want to review the MVK and MPY instructions. MVK is used to put the constants in a register and the MPY is used to multiply them. Save this in a file called lab1p1.asm .
  • Setup the program in Code Composer Studio and run it, recording the values in the registers at each step as you single step through the program. Be sure to note delay slots.

Part 2

  • Write an assembly language program that performs a dot product of the following vectors using a loop that incorporates a conditional branch (The data for a and b should be stored in memory).

a = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30]

b = [30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]

y = k a k b k size 12{y= Sum cSub { size 8{k} } {a rSub { size 8{k} } cdot b rSub { size 8{k} } } } {}

Use the ADD command to add the data, SUB to update a counter and a conditional B to perform the loop.

  • Save the program as lab1p2.asm and swap it for the other file in your project.
  • Record the results of the run. Also record the number of clock cycles to execute the program. You do not need to optimize your program in this part.

Part 3

  • Write a third program that performs the same operation as in the previous part but uses parallel instructions and the register file cross path . With the use of parallel instructions and the use of both register files the second program should take fewer instruction cycles. Be sure to use a loop in your optimized program.
  • Save the program as lab1p3.asm and swap it for the other file in your project.
  • Record the results of the run. Also record the number of clock cycles to execute the program.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Dsp lab with ti c6x dsp and c6713 dsk. OpenStax CNX. Feb 18, 2013 Download for free at http://cnx.org/content/col11264/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Dsp lab with ti c6x dsp and c6713 dsk' conversation and receive update notifications?

Ask