Special Filter Instructions

Any combination of registers different from the above will yield incorrect results with the FIR/COR instruction.

tag

0x0106

0x010

x[k–3]

x[k–2]

Use R5 to

wrap around

x[k]

x[k–1]

R0

0x0100

0x0102

After FIR/COR execution

The STAT register is saved in the filterSTAT_tag location. The output of the fil- tering operation in the example is located in AC0 (lower word) and AC1 (high word). This 32-bit result is stored in the SampleOut RAM location. R0 should be pointing to the oldest sample. The oldest sample, x[k–3], is overwritten by the next sample to be filtered, x[k+1]. R0 is saved in the startOfBuff pointer for the next FIR/COR instruction

Notice that R0 points backwards by one location from its starting point each time an FIR/COR instruction is executed. In the above figure, R0 would end up at successive locations in a clockwise manner.

4-64

Page 150
Image 150
Texas Instruments MSP50C6xx manual After FIR/COR execution