Search the Community
Showing results for tags 'sc_event_or_list'.
-
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*
-
Hello, To allow setting static sensitivity of dynamically spawned processes to an or'd list of sc_events, I expected to see a method like: void sc_spawn_options::set_sensitivity(const sc_event_or_list *); but do not see any such. next_trigger and wait however, do accept a reference to sc_event_or_list, so it appears to be inconsistent? For, dynamic sensitivity can use sc_event_or_list, but not static sensitivity.. I suppose we can't use sc_event_or_list to set the static sensitivity of statically spawned threads either (created using SC_THREAD/SC_METHOD) - but that is not my need. Further, there doesn't seem to be any way to retrieve the list of sc_event from an sc_event_or_list (as, say, std::vector<sc_event *>). If that was possible, then I could have called the set_sensitivity(const sc_event *) method repeatedly, for all events in the or'd list. Any help appreciated, thanks.
- 5 replies
-
- sc_event_or_list
- sc_spawn
-
(and 1 more)
Tagged with:
-
I'm using the follwing function. but there is a compile error in systemC 2.3. How to fix it? struct M: sc_module { sc_port<i_f, 0> p; // Multiport sc_event_or_list& all_events() { sc_event_or_list& or_list = p[0]->event() | p[0]->event(); for (int i = 1; i < p.size(); i++) or_list | p->event(); return or_list; } ... wait(all_events()); ... The compile error is "error: invalid initialization of non-const reference of type ?sc_core::sc_event_or_list&? from a temporary of type ?sc_core::sc_event_or_expr?" Thanks,