Documentation Center

  • Trial Software
  • Product Updates

Event Sequencing

Processing Sequence for Simultaneous Events

Even if simultaneous events occur at the same value of the simulation clock, the application processes them sequentially. The processing sequence must reflect causality relationships among events. This table describes the multiple-phase approach the application uses to determine a processing sequence for simultaneous events for which causality considerations alone do not determine a unique correct sequence.

PhaseEvents Processed in This PhaseProcessing Sequence for Multiple Events in This Phase
1Events not scheduled on the event calendarArbitrary.
2Events with priority SYS1Same as the scheduling sequence (FIFO).
3Events with priority SYS2Same as the scheduling sequence (FIFO).
4Events with numerical priority values

Ascending order of priority values.

For equal-priority events, the sequence is random or arbitrary, depending on the model's Execution order parameter.

When the sequence is arbitrary, you should not make any assumptions about the sequence or its repeatability.

The events with priority SYS1 enable the application to detect multiple signal updates before reacting to any of them. The events with priority SYS2 enable entities to advance in response to state changes.

For suggestions on how to use the information in the table when creating models, see Choose an Approach for Simultaneous Events.

Role of the Event Calendar

During a simulation, the application maintains a list, called the event calendar, of selected upcoming events that are scheduled for the current simulation time or future times. By referring to the event calendar, the application executes events at the correct simulation time and in an appropriate sequence.

The table below indicates which events are scheduled or might be scheduled on the event calendar. In some cases, you have a choice.

Event NameEvent Type in DebuggerScheduled On Event CalendarHow to Schedule Event on Event Calendar
Counter resetCounterResetYes 
Delayed restartDelayedRestartYes 
Entity advancement No 
Entity destruction No 
Entity generationEntityGenerationYes 
Entity requestEntityRequestYes 
Function callFunctionCallMaybeSelect Resolve simultaneous signal updates according to event priority, if present, in the dialog box of the block that generates the function call. If the dialog box has no such option, the function call is not scheduled on the event calendar.
Gate (opening or closing)GateYes 
Memory readMemoryReadMaybeSelect Resolve simultaneous signal updates according to event priority on the Read tab of the Signal Latch block's dialog box.
Memory writeMemoryWriteMaybeSelect Resolve simultaneous signal updates according to event priority on the Write tab of the Signal Latch block's dialog box.
New head of queueNewHeadOfQueueYes 
Port selectionPortSelectionYes 
Preemption No 
ReleaseReleaseYes 
Sample time hit No 
Service completionServiceCompletionYes 
Storage completionStorageCompletionYes 
SubsystemSubsystemMaybeSelect Resolve simultaneous signal updates according to event priority in the dialog box of the Event Filter block that receives the signal that causes the subsystem execution.
TimeoutTimeoutYes 
Trigger No 
Value change No 

When you use blocks that offer a Resolve simultaneous signal updates according to event priority option, your choice determines whether, or with what priority, particular events are scheduled on the event calendar. For information about this option, see Resolution Sequence for Input Signals and Resolve Simultaneous Signal Updates.

For Further Information

Was this topic helpful?