Special Filter Instructions

mov

STAT,*filterSTAT_tag

;load STAT with last filter

 

 

 

tag status

rpt

N–2

 

 

firk

A0,*R0++

;Do one sample ––> 32 bit result

mov

*filterSTAT_tag,STAT

;save STAT with last filter

 

 

 

tag status

 

 

 

;R0 now points to the last

 

 

 

sample

movs

*ySampleOut,A0

 

;FIR outputs bits 0–15 in

 

 

 

AC0, 16–32 in AC1

mov

A0,*nextSample

 

;Replace last sample with

 

 

 

newest sample and update

mov

*R0,A0

 

; the start of the

mov

*startOfBuff,R0

 

; circular buffer to here

 

 

 

(R0)

The set up for the FIRK/CORK instruction is the same as the set up for the FIR/ COR instruction with the exception that the filter coefficients do not need to be loaded into RAM locations. Rather, they can be included just before speech data or elsewhere in the program code as follows,

FIRK_COEFFS

include “\..\tables\coeffs.dat”

4-66

Page 152
Image 152
Texas Instruments MSP50C6xx manual Firkcoeffs