Jump to content

How to synchronize Qt5 and SystemC?


katang

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
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...