新的SystemC库2.3.0于2012年7月发布。据报道,它能够支持电力域和抽象调度器等概念的建模。有没有人检查或研究过SystemC 2.3.0如何支持电源域和抽象调度器的建模?任何推荐的参考资料都是值得感谢的!
发布于 2013-04-04 07:24:57
根据this website!的说法,SystemC IEEE Std 1666-2011包括“新的过程控制扩展,它启用并简化了电力域和抽象调度器的建模”。因此,正是这些新的过程控制扩展为电力域/调度器建模提供了原语。
我研究了SystemC IEEE Std 1666-2005 LRM,实际上,sc_process_handle类现在有了更多的成员函数:suspend、resume、disable和enable、sync_reset_on和sync_reset_off、kill和<代码>d11、<代码>d12。
您可以按照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);
};https://stackoverflow.com/questions/14683391
复制相似问题