2

新的 SystemC 库 2.3.0 于 2012 年 7 月发布。据报道,它能够支持诸如电源域和抽象调度器等概念的建模。是否有人检查或研究过 SystemC 2.3.0 如何支持电源域和抽象调度程序的建模?任何参考推荐都表示赞赏!

4

1 回答 1

2

根据本网站, SystemC IEEE Std 1666-2011包括“新的过程控制扩展,可启用和简化电源域和抽象调度程序的建模” !因此,正是这些新的过程控制扩展为功率域/调度器建模提供了原语。

我检查了 SystemC IEEE Std 1666-2005 LRM,事实上,这个sc_process_handle类现在有更多的成员函数:suspend, resume, disableand enable, sync_reset_onand sync_reset_off, killand reset, throw_it

您可以按照 LRM 中的此示例来实施电源域(例如,通过禁用/启用或重置进程以响应触发电源关闭或上电序列的事件):

struct M1: sc_module
{
   M1(sc_module_name _name)
   {
      SC_THREAD(ticker);
      SC_THREAD(calling);
      SC_THREAD(target);
      t = sc_get_current_process_handle();
   }
   sc_process_handle t;
   sc_event ev;
   void ticker()
   {
      for (;;)
      {
         wait(10, SC_NS);
         ev.notify();
      }
   }
   void calling()
   {
      wait(15, SC_NS);
      // Target runs at time 10 NS due to notification
      t.suspend();
      wait(10, SC_NS);
      // Target does not run at time 20 NS while suspended
      t.resume();
      // Target runs at time 25 NS when resume is called
      wait(10, SC_NS);
      // Target runs at time 30 NS due to notification
      t.disable();
      wait(10, SC_NS);
      // Target does not run at time 40 NS while disabled
      t.enable();
      // Target does not run at time 45 NS when enable is called
      wait(10, SC_NS);
      // Target runs at time 50 NS due to notification
      sc_stop();
   }
   void target()
   {
      for (;;)
      {
         wait(ev);
         cout << "Target awoke at " << sc_time_stamp() << endl;
      }
   }
   SC_HAS_PROCESS(M1);
};
于 2013-04-03T23:24:56.607 回答