Quantcast
Channel: SystemC Language Forum RSS Feed
Viewing all articles
Browse latest Browse all 595

sc_event_or_list - identify notified events

$
0
0

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*


Viewing all articles
Browse latest Browse all 595

Trending Articles