计数器 - 2023.2 简体中文

Vivado Design Suite 用户指南: 编程和调试 (UG908)

Document ID
UG908
Release Date
2023-10-19
Version
2023.2 简体中文

4 个内置 16 位计数器都具有固定名称,分别为 $counter0$counter1$counter2$counter3。计数器可复位、递增,也可用于条件语句。

  • 要将计数器复位,请使用 reset_counter 操作:
    state my_state_0:
      reset_counter $counter0;
          goto my_state_1;
  • 要使计数器递增,请使用 increment_counter 操作:
    state my_state_0:
      increment_counter $counter3;
          goto my_state_1;

如需了解有关如何在条件语句中使用计数器的更多信息,请参阅 条件语句