首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SystemC 2.3.0支持建模电源域和抽象调度器

SystemC 2.3.0支持建模电源域和抽象调度器
EN

Stack Overflow用户
提问于 2013-02-04 17:03:31
回答 1查看 246关注 0票数 2

新的SystemC库2.3.0于2012年7月发布。据报道,它能够支持电力域和抽象调度器等概念的建模。有没有人检查或研究过SystemC 2.3.0如何支持电源域和抽象调度器的建模?任何推荐的参考资料都是值得感谢的!

EN

回答 1

Stack Overflow用户

发布于 2013-04-04 07:24:57

根据this website!的说法,SystemC IEEE Std 1666-2011包括“新的过程控制扩展,它启用并简化了电力域和抽象调度器的建模”。因此,正是这些新的过程控制扩展为电力域/调度器建模提供了原语。

我研究了SystemC IEEE Std 1666-2005 LRM,实际上,sc_process_handle类现在有了更多的成员函数:suspendresumedisableenablesync_reset_onsync_reset_offkill和<代码>d11、<代码>d12。

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

代码语言:javascript
复制
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);
};
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14683391

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档