Jump to content
Sign in to follow this  
VanTeo

A question about SC_METHOD and SC_THREAD

Recommended Posts

Hi all,

I am a novice in systemC.

When I learn about systemC from examples, I find that SC_MODULE will be used for combination logic and SC_THREAD will be used for sequential logic. Why is it? Can you explain to me clearly, please? How do SC_MODULE and SC_THREAD work?

 

Thank you,

Share this post


Link to post
Share on other sites

You can write both sequential and combinational logic using SC_THREADs.

You can write both sequential and combinational logic using SC_METHODs.

 

SC_THREADs are more flexible for modelling because you can call wait().

SC_METHODs generally execute faster (more efficiently) than SC_THREADs because they do not need to store state (because you are not allowed to call wait()).

 

Because you can do everything with SC_THREADs, including call wait(), there is no real need for SC_METHODs, except to optimise simulation speed.

 

regards

Alan

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.

Sign in to follow this  

×
×
  • Create New...