Jump to content

Recommended Posts

Posted

To make dependency of number of things on each other I can use Events and flags.

 

Like b/w modules we should use events and in single module to make dependent processes to each other we would use flags??

 

There would be some standard for the use of events from the point of good coding style or efficiency ?

 

Please clarify this.

Thanks!!

 

 

 

 

Regards

cam

  • 3 weeks later...
Posted

SystemC kernel simulates parallel execution of hardware. Processes suspends and resumes. A process can suspend itself and wait for an event to take place. When the event happens, that process resumes its execution. This is the most important power of SystemC. You cannot gain this advantage using flags, even inside the same module.

Posted

To make dependency of number of things on each other I can use Events and flags.

 

Like b/w modules we should use events and in single module to make dependent processes to each other we would use flags??

 

There would be some standard for the use of events from the point of good coding style or efficiency ?

 

Please clarify this.

Thanks!!

 

 

 

 

Regards

cam

Please use SC_THREAD with appropriate sensitivity list. That way the simulation kernel

assumes full responsibility for tracking events, i.e., exploit implicit events as much as

possible. Using sc_event/notify/wait(explicit events) transfers the burden of tracking

and acting on events to the programmer -- a difficult task with large number of modules

performing complicated operations. Flags are simply a no-no. Hope that helps.

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