Jump to content

What's the main function of wait(SC_ZERO_TIME)


stonezwr

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

 

regards

Alan

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...