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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 3470|回复: 2

[求助] 问两个sv中关于event的语法

[复制链接]
发表于 2016-8-25 10:43:53 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
1. @和wait有啥区别么

2. ->和->>的区别是啥

谢谢大家
发表于 2016-8-25 17:02:24 | 显示全部楼层
1.edge-sensitive vs level-sensitive;
2.Named events triggered via the -> operator unblock all processes currently waiting on that event. When triggered, named events behave like a one shot, i.e., the trigger state itself is not observable, only its effect. This is similar to the way in which an edge can trigger a flip-flop, but the state of the edge cannot be ascertained, i.e., if (posedge clock) is illegal.
Nonblocking events are triggered using the ->> operator. The effect of the ->> operator is that the statement executes without blocking, and it creates a nonblocking assign update event in the time in which the delay control expires or the event control occurs. The effect of this update event shall be to trigger the referenced event in the nonblocking assignment region of the simulation cycle.
发表于 2016-8-25 19:42:33 | 显示全部楼层
Named events are triggered via the -> operator.
Triggering an event unblocks all processes currently waiting on that event. When triggered, named events
behave like a one-shot, that is, the trigger state itself is not observable, only its effect. This is similar to the way
in which an edge can trigger a flip-flop but the state of the edge cannot be ascertained, i.e., if (posedge
clock) is illegal.

Nonblocking events are triggered using the ->> operator.
The effect of the ->> operator is that the statement executes without blocking and it creates a nonblocking
assign update event in the time in which the delay control expires, or the event-control occurs. The effect of
this update event shall be to trigger the referenced event in the nonblocking assignment region of the simulation
cycle.

The @ operator blocks the calling process until the given event is triggered.
For a trigger to unblock a process waiting on an event, the waiting process must execute the @ statement before
the triggering process executes the trigger operator, ->. If the trigger executes first, then the waiting process
remains blocked.

wait ( hierarchical_event_identifier.triggered )
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. The triggered event property, thus, helps eliminate a
common race condition that occurs when both the trigger and the wait happen at the same time. A process that
blocks waiting for an event might or might not unblock, depending on the execution order of the waiting and
triggering processes. However, a process that waits on the triggered state always unblocks, regardless of the
order of execution of the wait and trigger operations.

这是我从sv的Language Reference Manual上摘录出来的,就不翻译了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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


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

GMT+8, 2024-12-25 14:39 , Processed in 0.016480 second(s), 8 queries , Gzip On, Redis On.

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