Jump to content
Tedy

Dynamic communication path in SystemC/TLM

Recommended Posts

Hi,

 

To create a dynamic process we have to use sc_spawn function, I want to know if it is possible to create a dynamic port ? else, how we can create a dynamic communication path between two components ?

 

Thanks

Ted

Share this post


Link to post
Share on other sites

There's not a dynamic port. The structure (modules/ports/channels) of a SystemC model is static once elaboration is complete.

 

TLM is intended to model systems using memory-mapped busses. In that case you could use a router, and re-program the routing during simulation - but there's no direct built-in support for that, you'd have to make or buy a router model,

 

kind regards

Alan

Share this post


Link to post
Share on other sites

You can do this with pointer to port or using sc_vector;

 

for example:

SC_MODULE (test_mod) {

sc_in<unsigned>  *data_port;

...
SC_CTOR(test_mod) {
if (create_data_port)
    data_port = new sc_in<unsigned> ("port_name");

}


}

Share this post


Link to post
Share on other sites

Thank you,

 

I mean by dynamic communication path, the connection and dispatch of ports and channels after simulation has started.

So, except the sc_spawn for a dynamic thread, is there any other dynamic structure to implement such dynamic ports ? otherwise is it possible to do this with a dynamic thread (to connect/dispatch ports and channels after the elaboration step) ?

Share this post


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