Tedy Posted April 21, 2016 Report Share Posted April 21, 2016 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 Quote Link to comment Share on other sites More sharing options...
apfitch Posted April 21, 2016 Report Share Posted April 21, 2016 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 Tedy 1 Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted April 21, 2016 Report Share Posted April 21, 2016 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"); } } Tedy 1 Quote Link to comment Share on other sites More sharing options...
Tedy Posted April 24, 2016 Author Report Share Posted April 24, 2016 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) ? Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted April 24, 2016 Report Share Posted April 24, 2016 No, it's not possible to create or connect ports after elaboration. 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.