2
新的SystemC库2.3.0于2012年7月发布。据报道,它能够支持电源域和抽象调度器等概念的建模。有没有人检查或研究过SystemC 2.3.0如何支持电源域和抽象调度程序的建模?任何推荐的参考文献都表示赞赏SystemC 2.3.0支持建模电源域和抽象调度器
新的SystemC库2.3.0于2012年7月发布。据报道,它能够支持电源域和抽象调度器等概念的建模。有没有人检查或研究过SystemC 2.3.0如何支持电源域和抽象调度程序的建模?任何推荐的参考文献都表示赞赏SystemC 2.3.0支持建模电源域和抽象调度器
SystemC的IEEE Std 1666-2011包括“新的处理控制的扩展,这使得和简化电源域和抽象调度的建模”根据this website!。 所以正是这些新的过程控制扩展为电源域/调度器建模提供了原语。
我检查了SystemC的IEEE Std 1666-2005 LRM,并且,的确,sc_process_handle
类现在有更多的成员函数:suspend
,resume
,disable
和enable
,sync_reset_on
和sync_reset_off
,kill
和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);
};