katang Posted January 7, 2018 Report Share Posted January 7, 2018 I am attempting to make an application where the engine runs a SystemC model, and its state is displayed for the user though a Qt5 GUI. The GUI can run in a stepwise mode (i.e. the user can stop at some breakpoints and browse actual status), or run continuously. I.e. i have two event queues which should be synchronized. How can i flush the events and synchronize the two queues, in order to display a consistent state? Is there any difference if I call sc_start() in sc_main(), before or after mainWin.show(); or inside mainWin? Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted January 7, 2018 Report Share Posted January 7, 2018 You want to write a GUI for C++ debugger? You can check QtCreator source code, it's written in C++ with Qt and it has integration with GDB/LLDB/CDB. You can run your SystemC model in debugger from QtCreator. Quote Link to comment Share on other sites More sharing options...
maehne Posted January 7, 2018 Report Share Posted January 7, 2018 Your Qt5 GUI and the SystemC model should run in separate threads. Access to shared state will have to be protected using the appropriate synchronisation primitives of your threading library. IEEE Std 1666-2011 provides some facilities to control the execution of a SystemC model, see, e.g., this nice presentation by John Ainsley at DATE 2012 on the "IEEE Std 1666-2011: The New SystemC Standard" from slide 17 onwards. The presentation also explains how to implement interactions between SystemC and OS threads using async_request_update() (slide 36 and onwards). There was also an interesting discussion on async_request_update in an older SystemC forum thread, which also includes an example by David C. Black. David also developed an interesting demonstrator showing some advanced techniques in SystemC. 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.