Jump to content

A question about SC_METHOD and SC_THREAD


VanTeo

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,

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

Link to post
Share on other sites

Archived

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

×
×
  • Create New...