在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
123
返回列表 发新帖
楼主: dingowjt

Verilog中Event的使用

[复制链接]
发表于 2011-7-7 13:38:23 | 显示全部楼层
人家楼主问的是event 都说不可compile 为何没有人解释下event用法呢
鄙人在密切关注
发表于 2011-7-12 19:06:30 | 显示全部楼层
event是不可以综合的 用来仿真
发表于 2011-11-24 15:49:32 | 显示全部楼层
我想知道event怎麼用
发表于 2012-5-31 10:58:25 | 显示全部楼层
Triggered


The "triggered" event property evaluates to true if the given event has been triggered in the current time-step and false otherwise. If event_identifier is null, then the triggered event property evaluates to false. Using this mechanism, an event trigger shall unblock the waiting process whether the wait executes before or at the same simulation time as the trigger operation.

In the following example, event "e" is triggered at time 20,40,60,80 . So the Value of "e.triggered" should be TRUE at time 20,40,60,80 and FALSE at rest of the time.


EXAMPLE:
   module main;
      event e;
      
      initial
         repeat(4)
            begin
            #20;
            ->e ;
            $display(" e is triggered at %t ",$time);
            end
      
      initial
        #100 $finish;
      
      always
      begin
         #10;
         if(e.triggered)
            $display(" e is TRUE at %t",$time);
         else
            $display(" e is FALSE at %t",$time);
      end
      
   endmodule

RESULT

e is FALSE at                   10
e is triggered at                   20
e is TRUE at                   20
e is FALSE at                   30
e is triggered at                   40
e is TRUE at                   40
e is FALSE at                   50
e is triggered at                   60
e is TRUE at                   60
e is FALSE at                   70
e is triggered at                   80
e is TRUE at                   80
e is FALSE at                   90
头像被屏蔽
发表于 2012-5-31 21:25:33 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2016-6-1 16:59:58 | 显示全部楼层
24楼好人,看来event不是触发上去就掉不下来了。完美的解决了我的问题,回去从新查BUG。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /3 下一条

×

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-4-24 12:21 , Processed in 0.022742 second(s), 6 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表