Counter Conditions - 2021.1 English

Vivado Design Suite User Guide Programming and Debugging (UG908)

Document ID
UG908
Release Date
2021-06-16
Version
2021.1 English

Counter conditions can be used in two-way and three-way branching conditional statements. Each counter condition consumes one counter comparator.

Important: Each counter has only one counter comparator. This means that you can only use a particular counter in a counter condition once in the entire trigger state machine program.

The probe port conditions consist of a comparison operator and a value. The valid probe condition comparison operators are:

  • == (equals)
  • != (not equals)
    Important: Each counter is always 16 bits wide.

Examples of valid counter condition values are:

  • 16-bit binary value of 0
    16'b0000_0000_0000_0000
    16'b0000000000000000
  • 16-bit hex value of 7A
    16'h007A
  • 16-bit integer value of 123
    16'u123

Examples of counter condition statements:

  • Counter $counter0 equals binary 0
    ($counter0 == 16'b0000000000000000)
  • Counter $counter2 does not equal decimal 23
    ($counter2 != 16'u23)