chunrong Posted September 2, 2014 Report Share Posted September 2, 2014 We have some different use-cases where SystemC models have to be created dynamically during application life time. According to our understanding, this is not officially supported. Our workaround is based on creating a new instance of sc_core::sc_simcontext and assign the instance to sc_default_global_context and sc_curr_simcontext. When having several instance in parallel, sc_curr_simcontext is assigned with the proper simcontext instance prior SystemC method invocations. The risk with this workaround is that sc_curr_simcontext is not mentioned in the documentation and might just disappear during further enhancements of SystemC. Class sc_simcontext is already listed as deprecated features. What do you suggest in our case to minimize the risk of not being compatible with upcoming versions of SystemC ? I would also like to point out that with the current workaround, unit testing can easily being achieved by using some of the common unit test frameworks available. They use to create different instances of the class under test when running the unit tests of a test suite. I think that other users might appreciate to perform not only model testing but perform tests on a finer granularity as well. Quote Link to comment Share on other sites More sharing options...
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.