Texas Instruments TMS320C64X User Manual

Page 112

Advertising
background image

DSP_blk_move

4-84

Block Move (Overlapping)

DSP_blk_move

Function

void DSP_blk_move(short * x, short * r, int nx)

Arguments

x [nx]

Block of data to be moved.

r [nx]

Destination of block of data.

nx

Number of elements in block. Must be multiple of 8 and

32.

Description

This routine moves nx 16-bit elements from one memory location pointed to
by x to another pointed to by r. The source and destination blocks can be
overlapped.

Algorithm

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_blk_move(short *x, short *r, int nx)
{
int i;

if( r < x )
{
for (I = 0; I < nx; i++)
r[i] = x[i];
} else
{
for (I = nx−1; I >= 0; i−−)
r[i] = x[i];
}
}

Special Requirements nx must be a multiple of 8 and

32.

Implementation Notes

-

Twin input and output pointers are used.

-

Bank Conflicts: No bank conflicts occur.

-

Interruptibility: The code is fully interruptible.

Benchmarks

Cycles

nx/4+18

Codesize

112 bytes

Advertising