Santhosh_Michael Posted September 14, 2018 Report Share Posted September 14, 2018 Hi all, have a single initiator and multiple target , i want to broadcast data to all the targets, how can i ?? Quote Link to comment Share on other sites More sharing options...
Eyck Posted September 14, 2018 Report Share Posted September 14, 2018 Actually you could use some kind of a router or broadcaster between the master and the target(s). Examples of this can be found here: or here: https://git.minres.com/SystemC/SystemC-Components/src/branch/master/incl/scc/router.h where the first one may be better suited as a stand-alone example HTH Quote Link to comment Share on other sites More sharing options...
Santhosh_Michael Posted September 14, 2018 Author Report Share Posted September 14, 2018 Thanks Eych ! and is it possible to work with multi_passthrough_socket / tlm_base_socket to achieve this ? Quote Link to comment Share on other sites More sharing options...
David Black Posted September 14, 2018 Report Share Posted September 14, 2018 Use a multi_pass_thru_socket and a simple loop (incomplete - extend as needed): #include <systemc> #include <tlm> #include <tlm_utils/simple_initiator_socket.h> #include <tlm_utils/multi_passthrough_initiator_socket.h> struct Broadcast : sc_core::sc_module tlm_utils::simple_target_socket target_socket<>; tlm_utils::multi_pass_through_initiator_socket initiator_socket<Broadcast>; SC_CTOR(Broadcast) : target_socket("target_socket") , initiator_socket("initiator_socket") { target_socket.register_b_transport( this, &Broadcast::b_transport ); } void b_transport(tlm::tlm_generic_payload& payload, sc_time& delay); }; void Broadcast::b_transport(tlm::tlm_generic_payload& payload, sc_time& delay) { for (size_t i=0; i<initiator_socket.size(); ++i) { initiator_socket[i]->b_transport(payload, delay); } } Of course you need to be careful with this because technically you probably need to copy the payload (i.e. create an individual transaction per target). If it is a an IGNORE_COMMAND and you use appropriately designed extensions, then it might work. Quote Link to comment Share on other sites More sharing options...
Hariharan Bhagavatheeswara Posted July 17, 2019 Report Share Posted July 17, 2019 Hi David, bumping an old thread. How will you do the binding in your above example? I have a top level block which has A, B and C bounded as A -> B -> C. The module B has multiple sub-modules B1, B2 and B3. Can I have a multi_passthrough_initiator_socket within B and bind it (in the constructor of B) to the simple_target sockets of B1, B2 and B3? If so, how do I do it? 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.