|
发表于 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上摘录出来的,就不翻译了 |
|