Flags - 2020.2 English

Vivado Design Suite User Guide: Programming and Debugging (UG908)

Document ID
UG908
Release Date
2020-12-07
Version
2020.2 English

Flags can be used to monitor progress of the trigger state machine program as it executes. The four built-in flags have fixed names and are called $flag0, $flag1, $flag2, and $flag3. The flags can be set and cleared.

  • To set a flag, use the set_flag action:
    state my_state_0:
      set_flag $flag0;
          goto my_state_1;
  • To clear a flag, use the clear_flag action:
    state my_state_0:
      clear_flag $flag2;
          goto my_state_1;