SystemC 2.3:sc_start(1) Error

きっかけはこちらのスレッドになります。

Error : no matching function for call to SC_start

SystemC-2.2では、 sc_start(1); のような sc_start(int); 記述を許していたんですね。
書いたことなかったので、試しに記述して確認してみました。

  • SystemC-2.2の場合
$> ./main

             SystemC 2.2.0 --- Jul 20 2012 11:07:25
        Copyright (c) 1996-2006 by all Contributors
                    ALL RIGHTS RESERVED

Info: (I804) /IEEE_Std_1666/deprecated: sc_start(double) deprecated, use sc_start(sc_time) or sc_start()

Info: (I804) /IEEE_Std_1666/deprecated: You can turn off warnings about
             IEEE 1666 deprecated features by placing this method call as the
             first statement in your sc_main() function:

  sc_report_handler::set_actions("/IEEE_Std_1666/deprecated", SC_DO_NOTHING);
  • SystemC-2.3の場合

コンパイルエラーが表示されます。

$> make
sc_main.cpp:20: error: no matching function for call to ‘sc_start(int)’

sc_starvation_policy

SystemC-2.3では sc_startに対して定義が追加されています。

  • SystemC-2.2

void sc_start();
void sc_start( const sc_time& );
void sc_start( double, sc_time_unit );

  • SystemC-2.3

void sc_start();
void sc_start( const sc_time&, sc_starvation_policy p = SC_RUN_TO_TIME );
void sc_start( double , sc_time_unit, sc_starvation_policy p = SC_RUN_TO_TIME );

ここら辺の話はまた今度。

Enjoy SystemC!!!