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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...