dsp56800 Freescale Semiconductor, Inc, dsp56800 Datasheet - Page 426

no-image

dsp56800

Manufacturer Part Number
dsp56800
Description
16-bit Digital Signal Controllers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
B.1.14
The following two array search benchmarks are provided:
B.1.14.1
B.1.14.2
B-30
EndDO1_14_1:
;
;
EndDO1_14_2:
;
;
opt
MOVE
MOVEI
MOVE
CLR
DO
CMP
TLE
CMP
TLE
NOP
LEA
Index of the highest signed value
Index of the highest positive value
opt
MOVE
MOVEI #N_,X0
MOVE
CLR
DO
ABS
CMP
TLE
MOVE
LEA
Index of the Highest Signed Value
Index of the Highest Positive Value
Array Search
cc
#A_Vec14,R0
#N_/2,Y1
#-(A_Vec14+2),N
A
Y1,EndDO1_14_2
X0,A
X0,A
Y0,A
Y0,A
(R1)+N
cc
#A_Vec14,r0
#-(A_Vec14+1),N
A
X0,EndDO1_14_1
B
B,A
B,A
X:(R0)+,B
(R1)+N
X:(R0)+,X0
X:(R0)+,Y0
R0,R1
X:(R0)+,X0
R0,R1
X:(R0)+,B
R0,R1
DSP56800 Family Manual
Total: 15
Total: 14
; 2
; 2
; 2
; 1
; 2
; 1
; 1
; 1
; 1
; 1
; 1
_________
; 2
; 2
; 2
; 1
; 2
; 1
; 1
; 1
; 1
;
; 1
__________
2
2
2
1
3
1
1
1
1
1
1
2N+12 (worst case)
2
2
2
1
3
1
1
1
1
1
4N+11 (worst case)
vec addr, must be lwr 32k
load even number of elements
N calc index into A_Vec14
set lowest, load 1st elmnt
repeat # elmnts times (
which pos element largest?
transfer if A<=X0 & pntrs
which pos element largest?
transfer if A<=Y0 & pntrs
required to access R1
R1 is corrected for index
vec addr, must be lwr 32k
load number of elements
N calc index into A_Vec14
set lowest, load 1st elmnt
repeat # elmnts times
for largest this not req
which magnitude largest?
transfer if A<=B & pntrs
load next element,
R0 has +1 of desired pntr
R1 is corrected for index
Freescale Semiconductor

Related parts for dsp56800