Hello,
With the following example, I have a method which is sensitive to an event which is notified(immediately) from end_of_elaboration() function.
This gives Segmentation fault (core dumped).
However if I do func_event.notify(SC_ZERO_TIME); or func_event.notify(1,SC_NS), there is no Segmentation fault
#include "systemc.h"
class TOP : public sc_module
{
public:
sc_event func_event;
SC_HAS_PROCESS(TOP);
TOP(sc_module_name name) {
SC_METHOD(method_function);
sensitive<<func_event;
dont_initialize();
}
void end_of_elaboration(){
func_event.notify();
}
void method_function() {
std::cout<<"inside f() before wait"<<std::endl;
}
};
int sc_main(int argc, char* argv[])
{
TOP top("top");
sc_start();
return 0;
}
Please have a look, thanks in advance.