Thanks to everyone for the asnwer, but I did a little mistake while posting the code. The one I previously posted works to me as well, the not working one is the following:
#include <iostream>
#include "systemc.h"
SC_MODULE(stim)
{
sc_in<bool> Clk;
void StimGen()
{
cout << sc_time_stamp() << "Hello World!\n";
}
SC_CTOR(stim)
{
SC_THREAD(StimGen);
sensitive << Clk.pos();
}
};
int sc_main(int argc, char* argv[])
{
sc_clock TestClk("clk", 10,SC_NS);
stim Stim1("Stimulus");
Stim1.Clk(TestClk);
sc_start();
return 0;
}
Which is identical to the previous one e