I'm not sure what to do, really ^^'
I'm not familiar with sc_buffer nor default_event().
I have this code right now. But in this way I can't react to two ones (1) coming in serie, because there has been no change on the input.
Testbench:
int sc_main(int argc, char **argv)
{
sc_time sim_time(atof(argv[1]), SC_SEC);
char *infile = argv[2];
sc_signal<bool> sig;
// create modules
Generator generator("Generator", infile);
Controller controller("Controller");
// connect channels to ports
generator(sig);
controller(sig);
}
(stimuli) Generator:
SC_MODULE(Generator)