Texas Instruments TMS320C64X Programmer's Reference Manual page 34

Dsp little-endian dsp library
Hide thumbs Also See for TMS320C64X:
Table of Contents

Advertisement

DSP_autocor_rA8
DSP_autocor_rA8
Function
Arguments
Description
Algorithm
Special Requirements
Implementation Notes
4-6
AutoCorrelation
void DSP_autocor_rA8(short * restrict r, const short * restrict x, int nx, int nr)
r[nr]
Output array, Must be double word aligned.
x[nx+nr]
Input array. Must be double-word aligned.
nx
Length of autocorrelation. Must be a multiple of 8.
nr
Number of lags. Must be a multiple of 4.
This routine accepts an input array of length nx + nr and performs nr
autocorrelations each of length nx producing nr output results. This is typically
used in VSELP code.
This is the C equivalent of the assembly code without restrictions. Note that
the assembly code is hand optimized and restrictions may apply.
void DSP_autocor(short r[ ],short x[ ], int nx, int nr)
{
int i,k,sum;
for (i = 0; i < nr; i++){
sum = 0;
for (k = nr; k < nx+nr; k++)
sum += x[k] * x[k−i];
r[i] = (sum >> 15);
}
}
-
nx must be a multiple of 8.
-
nr must be a multiple of 4.
-
x[ ] must be double-word aligned.
-
r[ ] must be double-word aligned.
-
Bank Conflicts: No bank conflicts occur.
-
Interruptibility: The code is interruptible.
-
The inner loop is unrolled 8 times.
-
The outer loop is unrolled 4 times.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tms320c64x+

Table of Contents