Khushi Posted July 24, 2019 Report Share Posted July 24, 2019 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 Quote Link to comment Share on other sites More sharing options...
David Black Posted July 25, 2019 Report Share Posted July 25, 2019 (edited) 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 July 25, 2019 by David Black Incorrect object. Quote Link to comment Share on other sites More sharing options...
karthickg Posted July 31, 2019 Report Share Posted July 31, 2019 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 Quote Link to comment Share on other sites More sharing options...
David Black Posted August 1, 2019 Report Share Posted August 1, 2019 We shall have to wait and see w.r.t. co-routines, but they do look promising. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.