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

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