Wei He
Wei He

Reputation: 107

Loading SystemC modules dynamically at run-time

In my simulator framework, the HW/SW modules are implemented in SystemC and pre-built. The platform to be simulated is described in XML. The simulator core parses the XML, determines the modules used and corresponding libraries files (e.g. dlls in Windows), and loads these modules dynamically at run-time. But I found no sample code of SystemC loading modules dynamically.

How can I do this in SystemC?

Upvotes: 1

Views: 585

Answers (1)

jclin
jclin

Reputation: 2559

Because you said the example in DLLs of Windows, I assume you are doing so in Windows platform. So I suggest you can read the article and example in MSDN http://msdn.microsoft.com/en-us/library/windows/desktop/ms686944(v=vs.85).aspx .

If you are using unix platform, you could use dlopen and dlsym to load the corresponding shared libraries and retrieve the function address to be called from your main program.

Upvotes: 1

Related Questions