ashwathgan Posted September 30, 2015 Report Share Posted September 30, 2015 Hi all I was trying something like: SC_MODULE(A) { sc_out<bool> outP; bool var = false; void procc1() { outP.write(true); var = true; } void procc2() { while(some_condition) { if(var) { print something} wait(SC_ZER_TIME); } } constructor }; and I have another module which recives the output like: SC_MODULE(B ) { sc_in<>bool> inP; void procs3() { if(inP.read()) { print something }} constructor }; I elaborated in the order with A being instantated first and B being instantiated second. Hence, I could see the procc1() starting first. but what I then saw was that the thread procc2() was not executed, rather the procc3() from the module B was executed and then after that only procc2() got executyed. Is there any reason why the thread was ignored to be executed in the first place? Thanks Quote Link to comment Share on other sites More sharing options...
apfitch Posted September 30, 2015 Report Share Posted September 30, 2015 At time zero all threads and methods run in an undefined order (unless you use dont_initialize()). - the order of instantiation of modules is not relevant. regards Alan Quote Link to comment Share on other sites More sharing options...
ashwathgan Posted September 30, 2015 Author Report Share Posted September 30, 2015 Thanks Alan 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.