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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×