DSP_maxidx

Implementation Notes

 

- Bank Conflicts: No bank conflicts occur.

 

- Interruptibility: The code is interrupt-tolerant but not interruptible.

 

- The code is unrolled 16 times to enable the full bandwidth of LDDW and

 

MAX2 instructions to be utilized. This splits the search into 16 sub-ranges.

 

The global maximum is then found from the list of maximums of the

 

sub-ranges. Then, using this offset from the sub-ranges, the global

 

maximum and the index of it are found using a simple match. For common

 

maximums in multiple ranges, the index will be different to the above C

 

code.

 

 

- This code requires 40 bytes of stack space for a temporary buffer.

Benchmarks

Cycles

5 * nx / 16 + 42

 

Codesize

388 bytes

4-64

Page 92
Image 92
Texas Instruments TMS320C64X manual Global maximum is then found from the list of maximums