Next: Dynamic Simulation Up: A General Method for Previous: A Brief Overview

# Event Graph Representation

We represent a model using an event graph. Event graphs provide a representation for the static simulation algorithm to work on, and transformations on event graphs can be used to improve simulation performance.

An event graph partitions the model into events, represented by vertices, and uses directed edges to represent relationships between events. We define an event to be the largest unit of a program that will execute atomically during simulation, which corresponds to the code that would be executed during one step of an event-driven simulation. The semantics of the original language determines precisely how the boundaries between events are determined from the original source. In Verilog, events have boundaries at the start and finish of always and initial blocks, at explicit delays, and at statements that wait on signals (such as @ and wait). Each vertex has associated with it executable code from the Verilog program.

An edge represents a causal relationship between one event and another. Edges can take two forms: sensitizing and triggering. Event sensitizes a following event whenever they are separated by an @ or wait statement. The execution of event makes sensitive; can then be triggered by other events.

Triggering actions cause events to be scheduled for execution. There are three kinds of trigger actions: control flow, data flow, and delays. can trigger :

• if program control flows from to whenever a boolean expression evaluates to true after executing ,
• if the execution of changes the value of an expression , awaited by ,
• or if the delay statement #d separates and .

Note that not all control flow is represented by control flow edges. Only control flow that crosses an event boundary is represented in this way. All other control flow is contained within a single event.

A Verilog program is represented by an event graph , where

• is the set of events,

• is the start event,

• is the set of initially sensitive events,

• represents the sensitizing edges,

• , where is the set of boolean expressions, represents possible triggering actions due to control flow,

• , where is the set of expressions, represents possible triggering actions due to change of expression values, and

• , where is the set of whole numbers, represents possible triggering actions due to delay statements.

An example of an event graph for a small Verilog program is shown in Figure 1.

Next: Dynamic Simulation Up: A General Method for Previous: A Brief Overview

Robert French