返回介绍

17.12.4 例子

发布于 2020-09-09 22:55:54 字数 1788 浏览 921 评论 0 收藏 0

The following are examples of multiple-clock specifications:

sequence s1;
    @(posedge clk1) a ##1 b; // single clock sequence
endsequence

sequence s2;
    @(posedge clk2) c ##1 d; // single clock sequence
endsequence

1) multiple-clock sequence

sequence mult_s;
    @(posedge clk) a ##1 @(posedge clk1) s1 ##1 @(posedge clk2) s2;
endsequence

2) property with a multiple-clock sequence

property mult_p1;
    @(posedge clk) a ##1 @(posedge clk1) s1 ##1 @(posedge clk2) s2;
endproperty

3) property with a named multiple-clock sequence

property mult_p2;
    mult_s;
endproperty

4) property with multiple-clock implication

property mult_p3;
    @(posedge clk) a ##1 @(posedge clk1) s1 |=> @(posedge clk2) s2;
endproperty

5) property with named sequences at different clocks. In this case, if s1 contains a clock, then it must be identical to (posedge clk1). Similarly, if s2 contains a clock, it must be identical to (posedge clk2).

property mult_p5
    @(posedge clk1) s1 |=> @(posedge clk2) s2;
endproperty

6) property with implication, where antecedent and consequent are named multi-clocked sequences

property mult_p6;
    mult_s |=> mult_s;
endproperty

7) property using clock flow and overlapped implication:

property mult_p7;
    @(posedge clk) a ##1 b |-> c ##1 @(posedge clk1) d;
endproperty

Here, a, b, and c are clocked at posedge clk.

8) property using clock flow and if...else:

property mult_p8;
    @(posedge clk) a ##1 b |->
    if (c)
        (1 |=> @(posedge clk1) d)
    else
        e ##1 @(posedge clk2) f ;
endproperty

Here, a, b, c, and e are clocked at posedge clk.

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

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

发布评论

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