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

ID 683337
Date 9/30/2024
Public
Document Table of Contents

14.3.6. Choose Bits (ChooseBits)

The ChooseBits block selects individual bits from its input (scalar) signal and concatenates them to form its (scalar) output signal.

You specify the bits that occur in the output signal by providing a vector of non-negative integers. Each integer specifies an input bit appears in the output. The block numbers the input bits from 0 (least significant bit) and lists the output bits starting from the least significant bit (little-endian ordering).

The block has no restriction on how many times each input bit may appear in the output. You can omit, reorder, or duplicate bits.

For example, the vector [0,1,4,4,6,5] keeps bits 0 and 1 unchanged, omits bit 3, duplicates bit 4 and swaps the positions of bits 5 and 6.

Table 112.  Parameters for the ChooseBits Block
Parameter Description
Selected bits A vector of non-negative integers.
Table 113.  Port Interface for the ChooseBits Block
Signal Direction Type Description
d Input Any scalar. Data input.
q Output Unsigned integer. Data output.