DFD FXP Set Quantizer VI

Digital Filter Design VIs and Functions

DFD FXP Set Quantizer VI

Owning Palette: Fixed-Point Tools VIs

Installed With: Digital Filter Design Toolkit

Sets a quantizer or quantizers in a fixed-point filter. You must manually select the polymorphic instance you want to use.

Details  Example

Use the pull-down menu to select an instance of this VI.

 Place on the block diagram  Find on the Functions palette

DFD FXP Set Quantizer (One)

filter in specifies the input filter.
quantizer specifies the settings of the quantizer.
source specifies the quantizer source.

0Coefficients a/k (default)
1Input
2Output
3Multiplicand
4Product
5Sum
6Delay
7Coefficients b/v
wl specifies the word length, in number of bits, that the quantizer uses to represent a fixed-point number. The default is 16.
iwl specifies the integer word length, in number of bits, within wl that the quantizer uses to represent the integer part of a fixed-point number. The default is 1. iwl can be any integer value.
overflow mode specifies how this VI handles overflows and underflows in the quantizer.

0Saturation
1Wrap (default)
rounding mode specifies the rounding mode this VI uses in the quantizer.

0Nearest
1Truncation (default)
signed? specifies if the fixed-point number is a signed number. This VI supports signed numbers only. If you remove the checkmark from the signed? checkbox, the result you obtain might not be correct.
error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source specifies the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.
filter out returns a fixed-point filter.
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.

DFD FXP Set Quantizer (Group)

filter in specifies the input filter.
quantizers specifies the settings for a group of quantizers.
quantizer specifies the settings of the quantizer.
source specifies the quantizer source.

0Coefficients a/k (default)
1Input
2Output
3Multiplicand
4Product
5Sum
6Delay
7Coefficients b/v
wl specifies the word length, in number of bits, that the quantizer uses to represent a fixed-point number. The default is 16.
iwl specifies the integer word length, in number of bits, within wl that the quantizer uses to represent the integer part of a fixed-point number. The default is 1. iwl can be any integer value.
overflow mode specifies how this VI handles overflows and underflows in the quantizer.

0Saturation
1Wrap (default)
rounding mode specifies the rounding mode this VI uses in the quantizer.

0Nearest
1Truncation (default)
signed? specifies if the fixed-point number is a signed number. This VI supports signed numbers only. If you remove the checkmark from the signed? checkbox, the result you obtain might not be correct.
error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source specifies the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.
filter out returns a fixed-point filter.
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.

DFD FXP Set Quantizer Details

Depending on whether you use the fixed-point filter model for simulation or for code generation, the DFD FXP Set Quantizer VI has different restrictions on the word lengths, the overflow mode, and the rounding mode of the quantizers. The following table lists the restrictions on each quantizer for simulation.

Quantizer Word Length Rounding Mode Overflow Mode
Coefficients a/k 1…32 No Restriction No Restriction
Coefficients b/v 1…32 No Restriction No Restriction
Input 1…32 No Restriction No Restriction
Output 1…32 No Restriction No Restriction
Multiplicand 1…32 No Restriction No Restriction
Product 1…64 No Restriction No Restriction
Sum 1…64 No Restriction No Restriction
Delay 1…32 No Restriction No Restriction
Gain 1…32 Nearest Saturation

The following table lists the restrictions on each quantizer for code generation.

Quantizer Word Length Rounding Mode Overflow Mode
Coefficients a/k 1…32 No Restriction No Restriction
Coefficients b/v 1…32 No Restriction No Restriction
Input 1…32 No Restriction No Restriction
Output1 1…32 Truncation Wrap
Multiplicand2 1…32 Truncation Wrap
Product 32 Truncation Wrap
Sum 32 Truncation Wrap
Delay3 Equal to Input/Sum Truncation Wrap
Gain 1…32 Nearest Saturation

1For LabVIEW code generation, such as integer LabVIEW code and LabVIEW FPGA code, the rounding and overflow modes of the output quantizer do not have any restrictions. However, if you want to generate C code, the rounding mode must be Truncation and the overflow mode must be Wrap.

2For FIR structures, the word length of the multiplicand quantizer must conform to the restrictions as the following table shows:

Filter Structure Word Length of Multiplicand
FIR Direct Form Equal to Input
FIR Direct Form Transposed Equal to Input
FIR Symmetric Equal to min(Input+1, 32)
FIR Antisymmetric Equal to min(Input+1, 32)

The integer word length of the multiplicand quantizer must be greater than or equal to the value in the default fixed-point model.

3For FIR structures other than the FIR Direct Form Transposed structure, the word length of the delay quantizer must be equal to that of the input quantizer. For the FIR Direct Form Transposed structure and all IIR and lattice filter structures, the word length of the delay quantizer must be equal to that of the sum quantizer.

Example

Refer to the Customized Fixed-Point Filter Modeling and Simulation VI in the labview\examples\Digital Filter Design\Fixed-Point Filters\Single-Rate directory for an example of using the DFD FXP Set Quantizer VI.

 Open example  Browse related examples