Jump to content
Khushi

HW modeling using c++11 threads

Recommended Posts

Hi

I am a bit curious to know if it is possible to do HW modeling using c++11 threads without using systemC/TLM library ?

Any model example will be a great help.

Thanks

Khushi

Share this post


Link to post
Share on other sites

It is definitely possible to model using c++ threads; however, I think for most things it will actually be more difficult to use than SystemC because of the preemptive nature and requirements to use mutexes and semaphores. By contrast, SystemC provides a simplified cooperative approach multitasking approach. The techniques can also be mixed when appropriate. 

Edited by David Black
Incorrect object.

Share this post


Link to post
Share on other sites
On 7/25/2019 at 5:35 AM, David Black said:

It is definitely possible to model using c++ threads; however, I think for most things it will actually be more difficult to use than SystemC because of the preemptive nature and requirements to use mutexes and semaphores. By contrast, SystemC provides a simplified cooperative approach multitasking approach. The techniques can also be mixed when appropriate. 

Maybe once co-routines are in C++20? https://en.cppreference.com/w/cpp/language/coroutines 

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

×