hooman_hbi Posted August 31, 2015 Report Share Posted August 31, 2015 Hi, In my design I want a to have a SC_THREAD which waites on an array of events. Now I am aware of the fact that I could OR the events with '|'. But that solution is not handy when one is dealing with a large number of events. So is there any better solution? Thanks, Hooman Quote Link to comment Share on other sites More sharing options...
kartikkg Posted August 31, 2015 Report Share Posted August 31, 2015 Hi Hooman, Please see sc_event_or_list for your requirement. An example can be found here https://www.doulos.com/knowhow/systemc/new_standard/ Quote Link to comment Share on other sites More sharing options...
apfitch Posted August 31, 2015 Report Share Posted August 31, 2015 You can also just make your SC_THREAD sensitive to each element in the array, since a process sensitive to multiple events is sensitive to the or of those events, e.g. SC_THREAD(proc) for (int i=0; i< 100; i++) sensitive << my_array_of_100_events; regards Alan aarone 1 Quote Link to comment Share on other sites More sharing options...
plafratt Posted August 23, 2016 Report Share Posted August 23, 2016 Is there a preferred way of adding an event to the static sensitivity list for a single wait? I think it would be possible by ORing the static sensitivity list with another event, and sending the result to a wait. The problem is that I don't see an accessor function for a thread's sensitivity list. I guess one approach is to hard-code an sc_event_or_list that includes the static sensitivity list, but that seems a little clunky. sc_event_or_list or_list; for (int i=0; i< 100; i++) or_list |= my_array_of_100_events; or_list |= new_event; wait( or_list ); Is there a better way to add an event to the sensitivity list for a single wait? Thanks, Patrick 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.