ankitks Posted February 10, 2017 Report Share Posted February 10, 2017 I have a function (nb_trasport_fw) that is been called few times in same cycle ...nb_transport_fw(...) { ... queue.push_back(trans); e.notify() } I also have a thread that's waiting on event 'e'. arbitrate() { wait(e); //do I have all the transactions in my queue. //arbitrate among trasactions in queue. } Basically I need a point where I collect all the transactions and arbitrate among them. I can't really look at single transaction and make a decision. Challenging part is I don't know if function will be called 0,1 or N times. Thanks Quote Link to comment Share on other sites More sharing options...
ankitks Posted February 13, 2017 Author Report Share Posted February 13, 2017 any help here? Quote Link to comment Share on other sites More sharing options...
ralph.goergen Posted February 15, 2017 Report Share Posted February 15, 2017 How about using delta cycles? Their main reason is to bring determinism into concurrent systems. When you notify the event for the next delta cycle with e.notify(sc_core::SC_ZERO_TIME), then it will definitely see all transactions that happened in this delty cycle. Greetings Ralph AmeyaVS 1 Quote Link to comment Share on other sites More sharing options...
ankitks Posted February 17, 2017 Author Report Share Posted February 17, 2017 Ah..that make sense. Missed out on that one. Thanks! 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.