edge(b) takes a scalar boolean expression
input. It returns true, and triggers an event, when and only when
the input argument changes value from false to true. The return data
data type is a special category of boolean type, which returns true
only instantaneously, and returns false otherwise.
The following graphic illustrates the difference between boolean and event data types.
edge(b) returns true only when
from false to true.
You use the
edge operator to define event
when clauses. For more information,
edge(b) returns true when
from false to true, that is, triggers an event on the rising edge
To trigger an event on the falling edge of condition
To trigger an event both on the rising edge and on the falling
edge of condition
the event predicate in the
when clause. For more
information on data derivation rules between boolean and event data
types, see Event Data Type and edge Operator.
To trigger an event at a specific time, for example, 2 seconds
after the start of simulation, use