返回介绍

29.3.1 Specifying the signal that holds the current state

发布于 2020-09-09 22:56:01 字数 1051 浏览 1044 评论 0 收藏 0

Use the following pragma to identify the vector signal that holds the current state of the FSM:

/* tool state_vector signal_name */

where tool and state_vector are required keywords. This pragma needs to be specified inside the module definition where the signal is declared.

Another pragma is also required, to specify an enumeration name for the FSM. This enumeration name is also specified for the next state and any possible states, associating them with each other as part of the same FSM.

There are two ways to do this:

  • Use the same pragma:

/* tool state_vector signal_name enum enumeration_name */

  • Use a separate pragma in the signal’s declaration:

/* tool state_vector signal_name */
reg [7:0] /* tool enum enumeration_name */ signal_name;

In either case, enum is a required keyword; if using a separate pragma, tool is also a required keyword and the pragma needs to be specified immediately after the bit-range of the signal.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文