Two Channel Comb Filter - Motorola DSP56009 User Manual

24-bit digital signal processor
Table of Contents

Advertisement

C.7

TWO CHANNEL COMB FILTER

The following program implements a two channel (left and right) comb filter
structure in which gain and delays are not equal. This type of program is typically
used in surround sound and reverb applications. The filter structure is illustrated in
Figure C-4 . This example makes extensive use of the dual channel capability and
pipeline mechanism of the EMI. The code is optimized for SRAM (0 wait-state) 24-bit
words and 8-bit bus (6 instruction cycles per access). In the event that another EMI
mode is being selected, NOP instructions might be added in the noted points (#1, #2,
and #3). The optimized code for Fast DRAM mode, 24-bit words and 8-bit bus (7 I
per access and data available for read at last I
4 NOP instructions at point #3. This code assumes EWOR is already loaded with
offset zero.
; dual_comb
move
#<Base_buff,r0
move
#<Off_buff,r1
move
#<Gain_buff,r2
move
#<SAMPLE,r4
move
#0,x0
move
#0,x1
move
#0,y1
movep
#MODE,x:ECSR
do
#N,end_comb
move
x1,b
movep
x:(r0),x:EBAR0
movep
x:(r1),x:EOR0
movep
y:(r0),x:EBAR1
movep
y:(r1),x:EOR1
add
x0,b x:(r2),x0 y:(r4),a
movep
x:EBAR0,x:(r0)
; point (#1}
movep
x:EDRR0,y0
macr
x0,y0,a d,x1
movep
a,x:EDWR0
move
y1,b
add
y0,b y;(r2)+,y0 x:(r4),a
movep
x:EBAR1,y:(r0)+
; point (#2}
MOTOROLA
cyc
; pointer to base address values
; pointer to offset (delay)values
; pointer to gains values
; pointer to left/right samples
; x1 accumulates right comb outputs
; x1 accumulates left comb outputs
; EINR = 1, ERTS = 0
; load right channel output
; base address of left channel
; read trigger of left channel
; base address of right channel
; read trigger of right channel
; get left sample and gain values
; update base address left
; insert "nop or other"
; instructions if required
; read data of left channel
; compute input to delay buffer
; (left) and store right channel output
; insert input in delay buffer (left)
; load left channel output
; get right sample and gain values
; update base address (right)
; insert "nop or other"
; instructions if required
DSP56009 User's Manual
Application Examples
of the access) is achieved by adding
cyc
C-7

Advertisement

Table of Contents
loading

Table of Contents