tmp_sc Posted March 15 Report Share Posted March 15 Hi, I have a SystemC driver model which is connected to TLM memory module (AT style). I wanted to have scripting API feature of the model, in order e.g. to test memory read/write. Script should look like write(0x500, 0xABAB) // wait until write is done, or some fixed amount of time (D) var x = read(0x500) // wait memory read delay or D if (x != 0xABAB) { throw error; // or smth else } I checked duktape and C++ version (dukglue), but I don't know how to deal with timing/delays (script can be evaluated immediately, I don't know how to wait for some time time until the read/write is done or some fixed amount of time). Anyone had some similar problem, could you share your findings, or give some suggestions? Scripting language is not fixed. Quote Link to comment Share on other sites More sharing options...
Eyck Posted March 15 Report Share Posted March 15 AFAIK there is nothing out-of-the-box. Basically you need to embedd an interpreter and provide it with some function to be called by the script. Easy to embed would be Lua, Python or Tcl. In all these cases you need to write the code to integrate the interpreter with the SC kernel. Since SystemC is C++ this is not overly complicated (done that several times) For Python the is another option: use PySysC to construct and run your model. It allows to execute Python code as part of the model. Latest updates you may find here as it is under active development. 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.