SystemC中的增量周期和增量通知是什么? [英] What are the delta cycle and delta notification in SystemC?

查看:528
本文介绍了SystemC中的增量周期和增量通知是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SystemC中,有一种称为增量通知的通知,可以通过以下两种方法来调用.

In SystemC, there is a kind of notification called delta notification, which can be called in the following two methods.

event.notify(SC_ZERO_TIME);

event.notify(0, SC_NS);

它定义在增量通知调用中,对事件敏感的进程将在下一个增量周期的评估阶段运行.

It defines that in a delta notification call, processes sensitive to the event will run during the evaluation phase of the next delta cycle.

那么,所谓的增量周期"是什么?是像时钟周期或特定时间段那样定义的吗?

So, what's the so called "delta cycle"? Is it defined just like the clock cycle or a certain period of time?

推荐答案

增量周期不是时钟周期,也没有时间提前. Delta周期用于模拟新更新和从当前时间的当前执行阶段开始模拟的事件触发过程.

The delta cycle is not clock cycle and no time having advanced. Delta cycle is used to simulate new updates and event triggered processes to be simulated from current execution phase of current time.

简要的仿真步骤如下,

  1. 评估阶段:在当前运行队列中执行所有计划流程
  2. 更新阶段:更新值并将新的触发的可运行进程添加到等待队列或t + N的队列中.
  3. 如果队列(t + 0)不为空,请移动队列(t + 0)以运行队列并转到步骤1
  4. 如果等待队列(t + 0)为空,则将时间提前到最近的时间步长, 并移动队列(t + X)以运行队列并转到步骤1
  5. 如果队列为空,则意味着不需要模拟任何事件,则模拟结束.
  1. evaluation phase: execute all schedule processes in current run queue
  2. update phase: update value and add new triggered runnable processes to waiting queue or queue of t + N.
  3. if the queue (t+0) is not empty, move queue (t+0) to run queue and go to step 1
  4. if waiting queue (t+0) is empty, advance time to closest time step, and move queue (t+X) to run queue and go to step 1
  5. if queue is empty, it means no event needs to be simulated, then simulation ends.

因此,如果您使用的是增量通知,则该事件及其触发的进程将安排为在当前执行&更新阶段.因此,当此执行阶段的时间结束时,但在当前时间仍要运行其他计划流程时,它将再次进入评估阶段以运行这些流程,并且由于仿真仍处于同一时间戳中,因此没有任何时间提前

So if you are using delta notification, the event and its triggered processes are schedule to be run immediately after current execution & update phase. So when this time of execution phase has done, but it still has other schedule processes to be run at current time, it goes to evaluation phase again to run those processes, and no time has advanced due to the simulation is still in the same timestamp.

还有另一种称为立即通知的术语,它不带任何参数地调用notify().然后,该过程将立即安排到当前执行队列,而无需等待下一个增量周期.

There is another terminology called immediate notification, which is calling notify() without any argument. Then the process will be immediately schedule to current queue of execution, not awaiting to next delta cycle.

这篇关于SystemC中的增量周期和增量通知是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆