Previous Section Next Section

7.5 Temporal Operators

Events can be converted into basic or complex temporal expressions with temporal operators. Table 7-3 shows a description of the commonly used temporal operators.

Table 7-3. Temporal Operators

Operator Name

Operator Example

Operator Description

Inversion

not TE

The not temporal expression succeeds if the evaluation of the subexpression does not succeed during the sampling period. Thus not TE succeeds on every emission of the sampling event if TE does not succeed.

Failure

fail TE

A fail succeeds whenever the temporal expression fails. If the temporal expression has multiple interpretations (for example, fail (TE1 or TE2)), the expression succeeds if and only if all the interpretations fail.

And

TE1 and TE2

The temporal and succeeds when both temporal expressions start evaluating in the same sampling period and succeed in the same sampling period.

Or

TE1 or TE2

The or temporal expression succeeds when either temporal expression succeeds in the same sampling period.

Sequence

{TE1 ; TE2}

The semicolon (;) sequence operator evaluates a series of temporal expressions over successive emissions of a specified sampling event.

Success Check

eventually TE

This operator is used to indicate that the temporal expression should succeed at some unspecified time before the simulation ends.

Fixed Repetition

[num]*TE

Repetition of a temporal expression is frequently used to describe cyclic or periodic temporal behavior. The [num] fixed repeat operator specifies a fixed number of emissions of the same temporal expression.

First Match Variable Repeat

{[exp1..exp2]*TE} @event_name

The first match repeat expression succeeds on the first success of the temporal expression. In this temporal expression, exp1 is the lower number bound, and exp2 is the upper number bound.

True Match Variable Repeat

{~[exp1..exp2]*TE} @event_name

True match repeat operator is used to specify a variable number of consecutive successes of a temporal expression. exp1 is the lower number bound and exp2 is the upper number bound.

Yield

TE1 => TE2

The yield operator is used to assert that success of one temporal expression depends on the success of another temporal expression. The yield expression TE1 => TE2 is equivalent to (fail TE1) or {TE1 ; TE2}.

Delay

wait delay(sim_delay);

Succeeds after a specified simulation time delay elapses. A callback to Specman Elite occurs after the specified time.

Sample event

TE @event_name

Operator is used to specify the sampling event for a temporal expression. The specified sampling event overrides the default sampling event.

Unary named event

@event_name

An event can be used as the simplest form of a temporal expression. The temporal expression @event-name succeeds every time the event occurs. Success of the expression is simultaneous with the emission of the event.

Cycle

cycle @event_name

Represents one cycle of some sampling event.

Boolean Expression

true(exp) @event_name

The temporal expression succeeds each time the expression exp evaluates to TRUE at time of emission of the sampling event.

Edge Expression

rise/fall/change(exp) @event_name

Detects a change in the sampled value of an expression at a sampling event.

Previous Section Next Section