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

ID 683337
Date 6/20/2022
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.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 186.  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 187.  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