SystemVerilog Event Scheduling algorithm

Source: Internet
Author: User

While simulating System Verilog design and its test-bench including assertions, events have to be dynamically scheduled, ex Ecuted, and removed as the simulator advances time. To the feature, simulator has to maintain a data structure and usually would is a time ordered linked list. That means, at any point of time during simulation, event have one execution time which is current time or future time.

All scheduled events at a specific time define a time slot. A time slot is divided into a set of ordered regions, as preponed, Pre-active, Active, Inactive, Pre-nba, NBA, Post-nba, P Re-observed, observed, post-observed, reactive, re-inactive, Pre-re-nba, Re-nba, Post-re-nba, Pre-Postponed & Postponed.

Region GROUPS

There is groups of event regions that is used to help define the scheduling of System Verilog activity.

Active Region: Events scheduled in the active, Inactive, Pre-nba, NBA, and Post-nba regions is Active region set events.

Reactive region: Events scheduled in the reactive, re-inactive, Pre-re-nba, Re-nba, and Post-re-nba regions is reactive region set events .

Iterative Regions: The Active, Inactive, Pre-nba, NBA, Post-nba, pre-observed, observed, post-observed, reactive, re-inactive, PRE-RE-NBA, R E-nba, Post-re-nba, and pre-postponed regions are known as the iterative regions.

Simulation Region: The simulation regions of a time slot is the preponed, Active, Inactive, NBA, observed, reactive, re-inactive, RE-NBA and Postponed regions.

Simulator executes and removes all events in the current simulation time slot before moving to next time slot. In an even based simulator, a time slot was divided into a set of ordered regions to provide predictable interactions betwe En the design and test-bench code.

preponed

Sampling in the preponed are same as the sampling in the previous postponed region. All nets and variables used in concurrent assertions is sampled here.

The #1step sampling delay provides the ability to sample data immediately before entering the current time slot. #1step sampling is identical to taking the data samples in the preponed region of the current time slot.

ACTIVE Region

Sampling of blocking assignments (out = in), continuous assignments (assign Out=in) and RHS of non-blocking assignments (o UT <= in) is evaluated in the region. If intra-assignment delay exist for blocking assignment, it first computes RHS value and then suspend the executing proces S and schedule as future event. Delay 0 is scheduled for inactive region.

INACTIVE Region

The Inactive region holds the events to being evaluated after all the Active events is processed.

#0 delay statements is executed in the region.
out = #0 in

An explicit #0 delay control requires the process to being suspended and an event to being scheduled into the Inactive region of The current time slot, so, the process can be resumed in the next Inactive to Active iteration.

Nba

RHS of non-blocking assignment is occurred in active region and update of LHS would happen in NBA region.

The NBA region holds the events to being evaluated after all the Inactive events is processed. IF events is being executed in the active region set, a non-blocking assignment creates an event in the NBA region schedu Led for the current or a later simulation time.

Observed region

The observed region was for evaluation's property expressions when it was triggered. During Property Evaluation, Pass/fail code shall is scheduled in the reactive region of the current time slot. PLI callbacks is not allowed in the observed region.

Re-active Region

The Pass/fail code (code in action blocks of concurrent assertions) is scheduled. The code specified by blocking assignments on program blocks are also scheduled in this region.

The reactive region was the reactive region set dual of the Active region.

Re-inactive Region

#0 delay statements related to program block is scheduled in the region. The Re-inactive region holds the events to being evaluated after all the reactive events is processed.

The Re-inactive region was the reactive region set dual of the Inactive region.

Re-nba Region

The Re-nba region holds the events to being evaluated after all the re-inactive events is processed.

Update of LHS would happen in the the statements it RHS of non-blocking assignment occurred in re-active Regio N.the Re-nba Region was the reactive region set dual of the NBA region.

Postponed

Write values to any net or variable or scheduling a event in any previous region within the current time slot is illegal In the region. $monitor, $strobe, and other similar events is scheduled here.

SystemVerilog Event Scheduling algorithm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.