Jump to content

starting a thread from pre_main_phase()


Recommended Posts

I want to start a thread outside SV from pre_main_phase() of SV & want to continue that thread through out the simulation.

Basic requirement is to start the thread before main_phase() & I guess the nearest phase is pre_main_phase() but I observed that pre_main_phase() kills all its subsequent threads with out exception. Is there any way for this?

Link to comment
Share on other sites

hi,

everything started from the xyz_phase() callbacks is terminated at the end of xyz_phase(). if you want to take control over the thread management you have to hook into the phase_started() and phase_ended() callbacks. in there you can check if pre_main_phase is starting in order to start your own thread. please note that in case of jumps you might invoke pre_main_phase multiple times.

/uwe

Link to comment
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...