amitk3553 Posted February 29, 2016 Report Share Posted February 29, 2016 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. Quote Link to comment Share on other sites More sharing options...
fyyyf Posted August 12, 2016 Report Share Posted August 12, 2016 It can be found in LRM 4.4 The following constructs shall not be used directly or indirectly within callback end_of_elaboration:a) The instantiation of objects of class sc_module, sc_port, sc_export, sc_prim_channel Port bindingc) Export bindingd) The macros SC_CTOR, SC_CTHREADe) The member functions reset_signal_is and async_reset_signal_is of the class sc_modulef) Calls to event finder functionsg) Calls to member function notify of class sc_event with an empty argument list to create immediatenotificationsh) Calls to the process control member functions kill, reset, or throw_it of class sc_process_handle Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.