Lesson 1: Loop Carry Path From Memory Pointers - Texas Instruments TMS320C6000 Programmer's Manual

Hide thumbs Also See for TMS320C6000:
Table of Contents

Advertisement

2.2 Lesson 1: Loop Carry Path From Memory Pointers

Example 2–2. lesson_c.c
void lesson_c(short *xptr, short *yptr, short *zptr, short *w_sum, int N) {
int i, w_vec1, w_vec2;
short w1,w2;
w1 = zptr[0];
w2 = zptr[1];
for (i = 0; i < N; i++){
w_vec1 = xptr[i] * w1;
w_vec2 = yptr[i] * w2;
w_sum[i] = (w_vec1 + w_vec2) >> 15;
}
}
Open lesson_c.c
In the Project View window, right–click on lesson_c.c and select Open.
Compile the project and analyze the feedback in lesson_c.asm
When you rebuilt the project in Getting Ready for Lesson 1, each file was com-
piled with –k –gp –mh –o3. Because option –k was used, a *.asm file for each
*.c file is included in the rebuilt project.
1) From, the File menu, choose File –> Open. From the Files of Type drop–
down menu, select *.asm.
2) Select lesson_c.asm and click Open.
Each .asm file contains software pipelining information. You can see the
results in Example 2–3, Feedback From lesson_c.asm:
Lesson 1: Loop Carry Path From Memory Pointers
Compiler Optimization Tutorial
2-5

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C6000 and is the answer not in the manual?

Questions and answers

Table of Contents