DSP Builder for Intel® FPGAs (Advanced Blockset): Handbook

ID 683337
Date 6/26/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

15.4.9. Bit Extract (BitExtract)

The BitExtract block outputs the bits extracted from the input, and recast as the specified data type:

q = (a >> LSB)

If bit position is a negative number, the bit position is an offset from the MSB instead of LSB.

If the BitExtract block initialization parameter is a vector of LSB positions, the output is a vector of matching width, even if the input is a scalar signal. Use this feature to split a wide data line into a vector of Boolean signals. The components are in the same order as you specify in the initialization parameter. If the input to the BitCombine block is a vector, the width of any vector initialization parameter must match, and then a different bit can be selected from each component in the vector. The output data type does not always have to be Boolean signals. For example, setting to uint8 provides a simple way to split one wide signal into a vector of unsigned 8-bit data lines.

Table 165.  Parameters for the BitExtract Block
Parameter Description
Output data type mode Determines how the block sets its output data type:
  • Inherit via internal rule: the number of integer and fractional bits is the maximum of the number of bits in the input data types.
  • Specify via dialog: you can set the output type of the block explicitly using additional fields that are available when this option is selected. This option reinterprets the output bit pattern from the LSB up according to the specified type.
  • Boolean: the output type is Boolean.
Output data type Specifies the output data type. For example, sfix(16), uint(8).
Output scaling value Specifies the output scaling value. For example, 2^-15.
Least Significant Bit Position from Input Word Specifies the bit position from the input word as the LSB in the output word.

.

Table 166.  Port Interface for the BitExtract Block
Signal Direction Type Description Vector Data Support Complex Data Support
a Input Any fixed-point type Operand Yes No
q Output Derived fixed-point type Result Yes No