2f4f3c285fd5669fd7229fa6686220fa63e92532
3 class Sig
: public sc_prim_channel
{
5 virtual void before_end_of_elaboration()
7 cout
<< "prim_channel: before end of elaboration" << endl
;
9 virtual void end_of_simulation()
11 cout
<< "prim_channel: end of simulation" << endl
;
13 virtual void start_of_simulation()
15 cout
<< "prim_channel: start of simulation" << endl
;
23 SC_CTHREAD(y
, clk
.pos());
32 int sc_main(int argc
, char* argv
[])
40 if ( sc_start_of_simulation_invoked() )
41 cout
<< __FILE__
<< "(" << __LINE__
<< "): bad start flag should be false" << endl
;
42 if ( sc_end_of_simulation_invoked() )
43 cout
<< __FILE__
<< "(" << __LINE__
<< "): bad end flag should be false" << endl
;
46 if ( !sc_start_of_simulation_invoked() )
47 cout
<< __FILE__
<< "(" << __LINE__
<< "): bad start flag should be true" << endl
;
50 if ( !sc_end_of_simulation_invoked() )
51 cout
<< __FILE__
<< "(" << __LINE__
<< "): bad end flag should be true" << endl
;
53 cerr
<< "Program completed" << endl
;