SystemVerilog Event Scheduling Algorithm

While simulating System Verilog design and its test-bench including assertions, events has to be dynamically scheduled, executed, and removed as the simulator advances time. To have this feature, simulator has to maintain a data structure and usually would be a time ordered linked list. That means, at any point of time during simulation, event has 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, Pre-Observed, Observed, Post-Observed, Reactive, Re-Inactive, Pre-Re-NBA, Re-NBA, Post-Re-NBA, Pre-Postponed & Postponed.

REGION GROUPS

There are groups of event regions that are 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 are active region set events.

Reactive region: Events scheduled in the Reactive, Re-Inactive, Pre- Re-NBA, Re-NBA, and Post-Re-NBA regions are 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, Re-NBA, Post-Re-NBA, and Pre-Postponed regions are known as the iterative regions.

Simulation region: The simulation regions of a time slot are 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 is divided into a set of ordered regions to provide predictable interactions between the design and test-bench code.

PREPONED

Sampling in the preponed region is same as the sampling in the previous postponed region. All nets and variables used in concurrent assertions are 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 (out <= in) are evaluated in this region. If intra-assignment delay exist for blocking assignment, it first computes RHS value and then suspend the executing process and schedule as future event. Delay 0 will be scheduled for inactive region.

INACTIVE REGION

The Inactive region holds the events to be evaluated after all the Active events are processed.

#0 delay statements are executed in this region.
out = #0 in

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

NBA

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

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

OBSERVED REGION

The Observed region is for evaluation of property expressions when it is triggered. During property evaluation, pass/fail code shall be scheduled in the Reactive region of the current time slot. PLI callbacks are not allowed in the Observed region.

RE-ACTIVE REGION

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

The Reactive region is the reactive region set dual of the Active region.

RE-INACTIVE REGION

#0 delay statements related to program block are scheduled in this region.The Re-Inactive region holds the events to be evaluated after all the Reactive events are processed.

The Re-Inactive region is the reactive region set dual of the Inactive region.

RE-NBA REGION

The Re-NBA region holds the events to be evaluated after all the Re-Inactive events are processed.

Update of LHS will happen in this region for the statements its RHS of non-blocking assignment occurred in re-active region.The Re-NBA region is the reactive region set dual of the NBA region.

POSTPONED

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

原文地址:https://www.cnblogs.com/lyuyangly/p/9813568.html

时间: 2024-10-31 06:29:06

SystemVerilog Event Scheduling Algorithm的相关文章

systemverilog/event.triggered

1. event.triggered只会保持一个time_slot,在下一个time_slot将会丢失这个标记,如果不能保证在每一个time_slot都会检测到这个标志,那么将会丢失这个标志. 2. 必须保证在->event的同一个或之前的time_slot开始检测triggered. 3.virtual task wait_trigger ();如果和->event在同一个time_slot发生,那么可能丢失triggered     num_waiters++;     @m_event;

Rate Monotonic Scheduling algorithm

这篇文章写得不错 http://barrgroup.com/embedded-systems/How-To/RMA-Rate-Monotonic-Algorithm 另外rtems的官方文档也有类似说明 https://docs.rtems.org/doc-current/share/rtems/html/c_user/Rate-Monotonic-Manager-First-Deadline-Rule.html 总结以下几点: RMS 是一个优化的静态优先级硬实时调度算法,如果能被其他静态优先

Scheduling in Computing

1. Round-Robin Scheduling Algorithm: 时间片轮转调度 名字来源很有意思:古时候人们写联名上书反对领导时,为了避免当出头鸟,觉得把所有的签名写成一个环,于是领导就无法抓典型了. CPU 如何处理那么多得线程,如何决定那个先run,run 多长时间?时间片轮转算法是其中重要的一个. 时间片轮转调度是一种最古老,最简单,最公平且使用最广的算法.每个进程被分配一个时间段,称作它的时间片,即该进程允许运行的时间.如果在时间片结束时进程还在运行,则CPU将被剥夺并分配给另

C#学习日记24----事件(event)

事件为类和类的实例提供了向外界发送通知的能力,实现了对象与对象之间的通信,如果定义了一个事件成员,表示该类型具有 1.能够在事件中注册方法 (+=操作符实现). 2.能够在事件中注销方法(-=操作符实现). 3.当事件被触发时注册的方法会被通知(事件内部维护了一个注册方法列表).委托(Delegate)是事件(event)的载体,要定义事件就的要有委托.  有关委托的内容请点击 委托(De... www.mafengwo.cn/event/event.php?iid=4971258www.maf

spark 笔记 10: TaskScheduler相关

任务调度器的接口类.应用程序可以定制自己的调度器来执行.当前spark只实现了一个任务调度器TaskSchedulerImpl ===================task scheduler begin==================== -> TaskSchedulerImpl::submitTasks(taskSet: TaskSet)  处理接受task,它做了同步操作. -> new TaskSetManager(this, taskSet, maxTaskFailures)

Overview and Evaluation of Bluetooth Low Energy: An Emerging Low-Power Wireless Technology

转自:http://www.mdpi.com/1424-8220/12/9/11734/htm Sensors 2012, 12(9), 11734-11753; doi:10.3390/s120911734 Article Carles Gomez 1,*, Joaquim Oller 2 and Josep Paradells 2 1 Universitat Politècnica de Catalunya/Fundació i2Cat, C/Esteve Terradas, 7, Cast

PatentTips - Increasing turbo mode residency of a processor

BACKGROUND Many modern operating systems (OS's) use the Advanced Configuration and Power Interface (ACPI) standard, e.g., Rev. 3.0b, published Oct. 10, 2006, for optimizing system power. An ACPI implementation allows a processor core to be in differe

Linux多线程编程的条件变量

在stackoverflow上看到一关于多线程条件变量的问题,题主问道:什么时候会用到条件变量,mutex还不够吗?有个叫slowjelj的人做了很好的回答,我再看这个哥们其他话题的一些回答,感觉水平好高的.这里把他的回答粘贴一下方便以后查看,原帖在这里:When is a conditional variable needed, isn't a mutex enough? Even though you can use them in the way you describe, mutexes

Draft-TCAD

IEEEtran.cls 1 %% 2 %% IEEEtran.cls 2007/03/05 version V1.7a 3 %% 4 %% 5 %% This is the official IEEE LaTeX class for authors of the Institute of 6 %% Electrical and Electronics Engineers (IEEE) Transactions journals and 7 %% conferences. 8 %% 9 %% S