Jump to content

What's the main function of wait(SC_ZERO_TIME)


Recommended Posts

Hi, I have just learned SystemC for a few days.

I wonder what's the main function of wait(SC_ZERO_TIME).

It means process will wait until the end of this time or wait for a cycle. But, when should I use wait(SC_ZERO_TIME) and what's the sequence if there's two wait(SC_ZERO_TIME) in two thread?

Thank you all.

Link to comment
Share on other sites

It allows you to wait for a delta, which allows primitive channels to update.


You should use SC_ZERO_TIME when you want to wait for a delta, or notify an event a delta in the future.


If you have two wait(SC_ZERO_TIME) in two different threads, and both threads suspend at the same delta, there is no defined sequence (either thread may resume first).




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.

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...