Jump to content
Atul

multiple event in next trigger

Recommended Posts

Hello All,

I have written one process as SC_METHOD and want to use next_trigger into it.
But as next trigger overrides the static sensitivity. So i have to consider adding static event if needed explicitly withing method.
And here once i am triggered by that dynamic event so i have to add up the static sensitive events using next trigger for that i have written something as:
 

void A::proc1()                                                               //SC_METHOD(proc1)  sensitive << ev1<<ev2;
{

if(test_condition){}
else
  {
      next_trigger(dyanmic_event); 
      if(enable_if_dynamic_event)      // "enable_if_dynamic_event" will get enable once dynamic event gets triggered
      {
        //Do something
        next_trigger(ev1|ev2);              //void next_trigger( const sc_event_or_list & );
      }
  }
}

But here once dynamic event gets trigger and here if i add a statement as "next_trigger(ev1|ev2);" to enable the static sensitive event, this is not happening i mean this even is not triggering my method  when either ev1 or ev2 is triggered.

Please let me know if i am missing anything.

Share this post


Link to post
Share on other sites
21 hours ago, Atul said:

Hello All,

I have written one process as SC_METHOD and want to use next_trigger into it.
But as next trigger overrides the static sensitivity. So i have to consider adding static event if needed explicitly withing method.
And here once i am triggered by that dynamic event so i have to add up the static sensitive events using next trigger for that i have written something as:
 


void A::proc1()                                                               //SC_METHOD(proc1)  sensitive << ev1<<ev2;
{

if(test_condition){}
else
  {
      next_trigger(dyanmic_event); 
      if(enable_if_dynamic_event)      // "enable_if_dynamic_event" will get enable once dynamic event gets triggered
      {
        //Do something
        next_trigger(ev1|ev2);              //void next_trigger( const sc_event_or_list & );
      }
  }
}

But here once dynamic event gets trigger and here if i add a statement as "next_trigger(ev1|ev2);" to enable the static sensitive event, this is not happening i mean this even is not triggering my method  when either ev1 or ev2 is triggered.

Please let me know if i am missing anything.

Thanks Philipp!!!

Earliear i tried using next_trigger without any argument to retain static sensitivity(as next_trigger()), but was not working and now somehow it's working.
Thanks for your help.

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

×