ST20-C1 STMICROELECTRONICS [STMicroelectronics], ST20-C1 Datasheet - Page 58

no-image

ST20-C1

Manufacturer Part Number
ST20-C1
Description
Instruction Set Reference Manual
Manufacturer
STMICROELECTRONICS [STMicroelectronics]
Datasheet
5.4 Biquad IIR filter
5.3.3
Scaling of the input data in the X vector is controlled by the mac_scale field of the
status register, as described in section 5.6.
5.3.4
smacloop supports two data formats for the initial and final accum ulator value. If
mac_mode is 0 then Q15 (sign extended to 32 bits) is used, and the mode is said to
be ShortMode . If mac_mode is 1 then Q31 is used, and the mode is said to be
LongMode .
5.4
The biquad instruction performs a fixed sequence of 5 multiply-accumulates. Figure
5.1 shows an example using Q14 format. The parameters to the instruction are
pointers to three vectors of 16-bit values:
biquad calculates the next item in the Y vector according to the following formula, and
writes this to memory, incrementing the X and Y pointers by two bytes:
The X and Y vectors must be either both word-aligned or neither word-aligned.
The C pointer is left unchanged. This allows successive biquad instructions to be
executed back-to-back to generate a set of filter outputs with no additional overhead.
biquad scales the X input data according to the mac_scale field of the status register,
as described in section 5.6. The mac_scale field ma y be set using smacinit , as
described in section 5.3.
58/205
Y[2] =
Scaling
Accumulator format mode
Biquad IIR filter
an X input data vector,
a Y results vector and
a coefficient vector C. This vector must be word-aligned.
X[0].C[0] + X[1].C[1] + X[2].C[2] + Y[0].C[3] + Y[1].C[4]
mac_buffer
0
1
2
3
4
5
6
7
Table 5.4 mac_buffer coding
(data items)
Buffer size
infinite
128
256
16
32
64
4
8
Buffer size
(bytes)
infinite
128
256
512
16
32
64
8

Related parts for ST20-C1