beautypg.com

Altera FIR Compiler User Manual

Page 34

background image

3–10

Chapter 3: Parameter Settings

Specify the Input and Output Specifications

FIR Compiler User Guide

© May 2011

Altera Corporation

The FIR Compiler calculates how many bits your filter requires for full resolution
using two methods: actual coefficients or the coefficient bit widths. These parameters
define the maximum positive and negative output values. Select either Bit Width
Only

or Actual Coefficients in the Output Specification drop-down box. The FIR

Compiler will extrapolate the number of bits required to represent that range of
values. For full precision, you must use this number of bits in your system.

1

If your filter has coefficient reloading or multiple sets of coefficients, you must select
Bit Width Only

.

You can use full or limited precision for the filtered output (

out

). To use full precision,

leave the Output Number System set to Full Resolution (default). To limit the
precision, select Custom Resolution or Signed Binary Fractional from the drop down
box.

When the Output Number System is set to Custom Resolution, you can choose to
truncate or saturate the most significant bit (MSB) and to truncate or round the least
significant bit (LSB). Saturation, truncation, and rounding are non-linear operations.

Table 3–2

shows the options for limiting the precision of your filter.

Figure 3–8

shows an example of removing bits from the MSB and LSB.

Alternatively, you can select Signed Binary Fractional notation and specify the
number of bits to keep. The FIR Compiler displays how many bits are removed.

Table 3–2. Options for Limiting Precision

Bit Range

Option

Result

MSB

Truncate

In truncation, the filter disregards specified bits. (

Figure 3–8

).

Saturate

In saturation, if the filtered output is greater than the maximum positive
or negative value that can be represented, the output is forced (or
saturated) to the maximum positive or negative value.

LSB

Truncate

Same process as for MSB.

Round

The output is rounded away from zero.

Figure 3–8. Removing Bits from the MSB and LSB

D15
D14
D13
D12
D11
D10
D9
D8
.
.
D0

D9
D8
.
.
D0

Bits Removed from MSB

Full

Precision

Limited

Precision

D15
D14
.
.
.
.
D4
D3
D2
D1
D0

D11
D10
.
.
.
D1
D0

Bits Removed from LSB

Full

Precision

Limited

Precision

D15
D14
D13
D12
.
.
.
D3
D2
D1
D0

D10
D9
.
.
.
D1
D0

Bits Removed from both MSB & LSB

Full

Precision

Limited

Precision