Texas Instruments TMS320C64X manual DSPblkmove, Block Move Overlapping

Models: TMS320C64X

1 169
Download 169 pages 59.58 Kb
Page 112
Image 112

DSP_blk_move

DSP_blk_move

Block Move (Overlapping)

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

4-84

Page 112
Image 112
Texas Instruments TMS320C64X manual DSPblkmove, Block Move Overlapping