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

ID 683337
Date 7/15/2024
Public
Document Table of Contents

14.4.22. Count Leading Zeros, Ones, or Sign Bits (CLZ)

The CLZ block counts the leading zeros, ones, or sign bits of the input, and outputs that count.
Table 193.  Parameters for the CLZ Block
Parameter Description
Mode Determines how the block sets its output data type:
  • Count Leading Zeroes: returns the count of the leading zeros in the input
  • Count Leading Ones: returns the count of the leading ones in the input
  • Count Leading Digits: returns the count of the leading sign digits in the input
Table 194.  Port Interface for the CLZ 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 Number of consecutive zero bits in input word starting from the MSB Yes No