AN2094 Freescale Semiconductor / Motorola, AN2094 Datasheet - Page 42

no-image

AN2094

Manufacturer Part Number
AN2094
Description
ITU-T G.729 Implementation on StarCore SC140
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
References
42
;* lag_mag-lag_min is multiplied by 2 because variables used are Word16 *;
;* two maxima are used
;* initialized with MIN_32 value (-2147483648) *;
;* loop count is (lag_max-lag_min+1)/4
;* Fake comparison between d0 and d1 to initialize the T bit to FALSE for first loop2 iteration *;
L2start
;****************************************************************************************** *;
;* There must be a minimum of 2 instruction sets between doen3 and loopstart3
;* so the final comparison of the max corr computation has been moved here.
;* This section uses a loop unrolling technique.
;* **************************************************************************************** *;
;* T bit has been initialized to FALSE for first iteration. *;
;****************************************************************************************** *;
;* Compute correlations
;* **************************************************************************************** *;
L3start
[
]
[
]
[
move.l d1,r2
dosetup2 L2start
]
[
]
[
]
[
]
falign
loopstart2
[
[
]
[
]
falign
loopstart3
[
]
[
]
[
ift
ifa
clr d4
move.4f (r2)+,d8:d9:d10:d11
mac d3,d8,d4
mac d3,d9,d5
mac d3,d10,d6
mac d3,d11,d7
move.f (r2)+,d8
move.f (r3)+,d3
mac d3,d9,d4
mac d3,d10,d5
mac d3,d11,d6
mac d3,d8,d7
move.f (r2)+,d9
move.f (r3)+,d3
mac d3,d10,d4
mac d3,d11,d5
mac d3,d8,d6
mac d3,d9,d7
push d6
sub #3,d1
move.l #-2147483648,d0
asl d1,d1
adda r0,r1
move.l #2,n3
adda r0,r2
doen2 d2
move.w #8,d12
asll #3,d2
doen3 #20
tfr d8,d8
tfr d4,d1
add d12,d2,d14
sub #2,d2
tfr d8,d8
move.f (r2),d4
ITU-T G.729 Implementation on the StarCore™ SC140/SC1400 Cores, Rev. 1
clr d5
clr d6
clr d7
push d7
move.l d2,r1
tfr d1,d2
asrr #2,d2
inc d2
sub #1,d2
cmpeq d0,d1
tfr d0,d1
dosetup3 L3start
tfra r1,r3
tfr d9,d9
move.f (r3)+,d3
*;
*;
; dummy instruction for code alignment
; dummy instruction for code alignment
; tfr d8,d8 and tfr d9,d9 - dummy
; instruction for code alignment
Freescale Semiconductor
*;
*;
*;
*;

Related parts for AN2094