dsp56800 Freescale Semiconductor, Inc, dsp56800 Datasheet - Page 417

no-image

dsp56800

Manufacturer Part Number
dsp56800
Description
16-bit Digital Signal Controllers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
B.1.9
This code calculates the energy in a signal by summing together the square of each sample.
Second option when the DO instruction is replaced by REP. This sequence is uninterruptible while
performing the MAC instruction.
Freescale Semiconductor
EndDO1_9:
;
;
; if vector pointer located inside 128 addresses, use MOVES X:<AA,R0 (1cyc, 1wrd)
; if vector size is less than 63, initializing N is not required.
;
;
; if vector pointer located inside 128 addresses, use MOVES X:<AA,R0 (1cyc, 1wrd)
; if vector size is less than 63, initializing N is not required.
opt
MOVE
MOVEI #N_,N
CLR
DO
MAC
opt
MOVE
MOVEI #N_,N
CLR
REP
MAC
Energy in a Signal
cc
#A_Vec9,R0
A
N,EndDO1_9
Y0,Y0,A
cc
#A_Vec9,R0
A
N
Y0,Y0,A
m
X:(R0)+,Y0
X:(R0)+,Y0
X:(R0)+,Y0
X:(R0)+,Y0
DSC Benchmarks
Total:
Total:
; 2
; 2
; 1
; 2
; 1
__________
8
; 2
; 2
; 1
; 1
; 1
__________
7
2
2
1
3
1
1N+8
2
2
1
3
1
1N+8
point to signal a
load vector size
clear and load 1st val
repeat size N times
square value & load nxt
point to signal a
load vector size
clear and load 1st val
repeat size N times
square value & load nxt
B-21

Related parts for dsp56800