Special Filter Instructions
4-65
Assembly Language Instructions
Important note about setting the STAT register
It is very important to consider the initial value of the filterSTAT_tag variable.
Failure to set up the filterSTAT_tag variable can cause incorrect results in FIR/
COR operations. Overflow mode must always be reset. The overflow bit of the
STAT register may not be set.
For samples or filter coefficients that are signed, the sign extension mode bit
must also be set. Use the following set up for the filterSTAT_tag variable,
rovm
; Mandatory
; –– Any addition modes can be set hereafter ––
sxm
; For signed samples, coefficients, filter output
mov
*filterSTAT_tag,STAT
The FIRK/CORK instructions are almost identical to the FIR/COR instructions.
The main difference is that the filter coefficients are placed in ROM instead of
RAM. In other words, the filter coefficients are in a look-up table. As a result,
the R1 register is not used. Before a FIRK/CORK instruction executes, the
data pointer register, DP, must be set by the following code,
rovm
;reset overflow mode
mov
R5, –2 * N
;circular buffer length (3 words)
mov
A0,FIRK_COEFFS
; Loads address of lookup table
mov
A0,*A0
; Loads first coefficient to A0 and
sets DP
mov
MR,A0
; Load first coefficient in to MR
register
In the sequence of code above, the DP register points to the first filter coeffi-
cient (in program memory located at FIRK_COEFFS). This happens during
the mov A0,*A0 instruction. In addition, the DP register automatically incre-
ments to the next address. It should be pointing to the second filter coefficient
in program memory. If the contents of the DP register are used somewhere
else in the program, a context save and restore must be performed on the DP
register for each FIRK/CORK instruction. See the chapter 4 section called,
Lookup Instructions. During FIRK/CORK execution, the MR register is loaded
with the contents of the DP register, the DP register increments, pointing to the
next filter coefficient, and the multiply-accumulate is performed.
The remaining FIRK/CORK code is almost the same as the FIR/COR code.
mov
R0,*startOfBuff
;R0 points to start of circular
buffer
mov
AP0,0
;set up room for the
mov
STR,0
;32 bit output sample (AC0 and
AC1)
zacs
A0
; STR should be 1 for COR/CORK
instructions
Summary of Contents for MSP50C614
Page 1: ...MSP50C614 Mixed Signal Processor User s Guide SPSU014 January 2000 Printed on Recycled Paper ...
Page 6: ...vi ...
Page 92: ...3 22 ...
Page 300: ...Instruction Set Summay 4 208 Assembly Language Instructions ...
Page 314: ...Software Emulator 5 14 Figure 5 13 Project Menu Figure 5 14 Project Open Dialog ...
Page 325: ...Software Emulator 5 25 Code Development Tools Figure 5 25 EPROM Programming Dialog ...
Page 331: ...Software Emulator 5 31 Code Development Tools Figure 5 31 Context Sensitive Help System ...
Page 368: ...5 68 ...
Page 394: ...7 12 ...
Page 402: ...A 8 ...
Page 412: ...Packaging B 10 ...