Jump to content

collect trasactions from different threads at any given time

Recommended Posts

I have a function (nb_trasport_fw) that is been called few times in same cycle

...nb_transport_fw(...) {






I also have a thread that's waiting on event 'e'. 

arbitrate() {


//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.



Share this post

Link to post
Share on other sites

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.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now