blob: d39696b46de14dc0acde439147bbe1a77da7b825 [file] [log] [blame]
#include "systemc.h"
SC_MODULE(Y)
{
public:
sc_in<bool> in;
SC_CTOR(Y) : in("in")
{
SC_METHOD(comb);
sensitive << in;
init = 1;
}
int init;
void comb()
{
if ( init )
{
init = 0;
SC_METHOD(dork);
}
}
void dork()
{
cout << "dork" << endl;
}
};
int sc_main(int argc, char* arg[])
{
sc_clock clock;
Y y("y");
y.in(clock);
sc_start(10, SC_NS);
cerr << "Program completed" << endl;
return 0;
}