*andre* Posted July 3, 2015 Report Share Posted July 3, 2015 Hallo, I have a SC_THREAD which has a dynamic synchronization. I use a sc_event_or_list as the wait-function argument. void notifyForGeneratedOutPix(void) { using namespace std; while (true) { sc_core::wait( m_outPixEvOrList ); //I'd like to do something like this: for(auto event : m_outPixEvOrList) { if(event.isNotified()) { cout << "@ " << setw(5) << sc_core::sc_time_stamp(); cout << " | delta cycle: " << setw(5) << sc_core::sc_delta_count(); cout << "Written values from "; this->dump(cout); cout << endl; cout << "value: "; dumpOutPixel(event); //map access with event as key } else continue; } } The events synchronize a method where I need to know which event is notified and has resumed the thread process. I haven't found a method or function to check an event if it is notified or not. The event class have this enumaration enum notify_t { NONE, DELTA, TIMED }; but I haven't found something to check that flag. Is their any way to find out if a event is notified or not? Thx *andre* Quote Link to comment Share on other sites More sharing options...
apfitch Posted July 3, 2015 Report Share Posted July 3, 2015 No, there is no way of finding out. You could re-write your code to use sc_signal<bool>, which has an event() method to determine if the signal was triggered. regards Alan Quote Link to comment Share on other sites More sharing options...
*andre* Posted July 5, 2015 Author Report Share Posted July 5, 2015 Thx Alan, but I work at transfer level and a re-write is not possible because of other already written modules. Maybe it's an idea for a next version of the systemC standard to make it possible. regards *andre* 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.