quick.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

   

space.gif

   

space.gif

  ../images/main/bullet_green_ball.gif Introduction to Temporal Expressions

Temporal expressions provide a declarative way to describe temporal behavior. The e language provides a set of temporal operators and keywords that can be uses to construct temporal expressions. A temporal expression (TE) is a combination of events and temporal operators that describes behavior. A TE expresses temporal relationships between events, values of fields, variables, or other items during a test.

   

space.gif

Temporal expressions are used to define the occurrence of events, specify sequences of events as checkers, and suspend execution of a thread until the given sequence of events occurs. Temporal expressions are only legal in the following constructs:

   

space.gif

  • wait and sync actions in time-consuming methods (TCMs)
  • event definitions and expect or assume struct members.
   

space.gif

TE can be used like assertions in HDL (PSL or SVA), so they can be used for checking protocols.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif Sampling Event

A key step in determining the meaning of a temporal expression is to identify its sampling event. The sampling event for a TE is one of the following, in decreasing order of precedence.

   

space.gif

  • The sampling event specified with the binary @ operator.
  • The sampling event inherited from the parent temporal expression.
  • The sampling event of the TCM if the TE appears under a wait or sync action of that TCM.
  • sys.any, if none of the above applies.
   

space.gif

  ../images/main/bullet_green_ball.gif Temporal Operators and Constructs

This section describes the constructs you can use in temporal expressions.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif not

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

   

space.gif

  ../images/main/bulllet_4dots_orange.gif fail

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.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif and

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

   

space.gif

  ../images/main/bulllet_4dots_orange.gif or

The or temporal expression succeeds when either temporal expression succeeds.

   

space.gif

An or operator creates a parallel evaluation for each of its subexpressions. It can create multiple successes for a single temporal expression evaluation.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif { exp ; exp }

The semicolon (;) sequence operator evaluates a series of temporal expressions over successive occurrences of a specified sampling event. Each temporal expression following a ";" starts evaluating in the sampling period following that in which the preceding temporal expression succeeded. The sequence succeeds whenever its final expression succeeds.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif eventually

Used to indicate that the temporal expression should succeed at some unspecified time. Typically, eventually is used in an expect struct member to specify that a temporal expression is expected to succeed sometime before the quit event occurs for the struct.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif [ exp ]

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

   

space.gif

If the numeric expression evaluates to zero, the temporal expression succeeds immediately.

   

space.gif

   

space.gif

  ../images/main/bulllet_4dots_orange.gif [ exp..exp ]

The first match repeat operator is only valid in a temporal sequence {TE; TE; TE}. The first match repeat expression succeeds on the first success of the match-expression between the lower and upper bounds specified for the repeat-expression.

   

space.gif

First match repeat also enables specification of behavior over infinite sequences by allowing an infinite number of repetitions of the repeat-expression to occur before the match-expression succeeds.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif ~[ exp..exp ]

True match variable repeat succeeds every time the subexpression succeeds. This expression creates a number of parallel repeat evaluations within the range.

   

space.gif

True match repeat also enables specification of behavior over infinite sequences by repeating an infinite number of occurrences of a temporal expression.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif =>

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}.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif detach

A detached temporal expression is evaluated independently of the expression in which it is used. It starts evaluation when the main expression does. Whenever the detached TE succeeds it emits an "implicit" event which will only be recognized by the main TE. The detached temporal expression inherits the sampling event from the main temporal expression.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif delay

Succeeds after a specified simulation time delay elapses. Attaching a sampling event to delay has no effect. The delay ignores the sampling event and succeeds as soon as the delay period elapses.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif @ unary event operator

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

   

space.gif

  ../images/main/bulllet_4dots_orange.gif @ sampling operator

Used to specify the sampling event for a temporal expression. The specified sampling event overrides the default sampling event.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif cycle

Represents one cycle of some sampling event. With no explicit sampling event specified, this represents one cycle of the sampling event from the context.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif true(exp)

Use a Boolean expression as a temporal expression. Each occurrence of the sampling event causes an evaluation of the Boolean expression. The Boolean expression is evaluated only at the sampling point.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif change(exp)

Detects a change in the sampled value of an expression.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif consume

Removes the occurrence of an event so that it is not available for other temporal expressions. The consume expression succeeds whenever the event occurs. If the event occurs more than once during any given cycle, all occurrences are consumed.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif exec

Invokes an action block when a temporal expression succeeds. The actions are executed immediately upon the success of the expression, but not more than once per tick.

   

space.gif

   

space.gif

   

space.gif

   

space.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

  

Copyright © 1998-2014

Deepak Kumar Tala - All rights reserved

Do you have any Comment? mail me at:deepak@asic-world.com