SumitK 0 Report post Posted March 22 Hi Folks In my inteconnect model, I have a target socket In (which allows multiple initiator sockets connected to it) and an array of initiator socket like folloiwng tlm_utils::multi_passthrough_target_socket<QC_Mux_base<N_TARGETS>, 32, tlm::tlm_base_protocol_types,0,sc_core::SC_ZERO_OR_MORE_BOUND > In tlm_utils::multi_passthrough_initiator_socket<QC_Mux_base<N_TARGETS>, 32, tlm::tlm_base_protocol_types,1,sc_core::SC_ZERO_OR_MORE_BOUND > Out[MAX] Now if I receive some backward transaction, e.g. nb_transport_bw or invalidate_direct_mem_ptr, on some of the Out socket, I need to forward it via In socket. For that do I just say In->nb_transport_bw(...) and In->invalidate_direct_mem_ptr(...) or for(unsigned int i=0; i< In.size(); i++) In->nb_transport_bw(...) and for(unsigned int i=0; i< In.size(); i++) In->invalidate_direct_mem_ptr(...) wrt compilation, both are accepted Thanks in Advance Thanks Sumit Share this post Link to post Share on other sites
Eyck 1 Report post Posted March 22 Hi Sumit, both options will forward your transaction only to the first bound initiator socket of your multi_passthrough_target_socket as it just calls the operator->() of the underlying port. What you want to do is: for(unsigned int i=0; i<In.size(); ++i) In[i]->invalidate_direct_mem_ptr(...) But here you forward the call to all initiator sockets. In case of invalidate_direct_mem_ptr() this might be ok but for nb_transport_bw() it isn't as the call is part of the AT phases protocol and then you send e.g a BEG_RESP to a socket which never sent a BEG_REQ thus violating the TLM protocol as specified in the TLM 2.0 LRM (e.g. section 8.2.6) Cheers -Eyck Share this post Link to post Share on other sites
SumitK 0 Report post Posted March 26 On 3/22/2018 at 10:43 AM, Eyck said: Hi Sumit, both options will forward your transaction only to the first bound initiator socket of your multi_passthrough_target_socket as it just calls the operator->() of the underlying port. What you want to do is: for(unsigned int i=0; i<In.size(); ++i) In[i]->invalidate_direct_mem_ptr(...) But here you forward the call to all initiator sockets. In case of invalidate_direct_mem_ptr() this might be ok but for nb_transport_bw() it isn't as the call is part of the AT phases protocol and then you send e.g a BEG_RESP to a socket which never sent a BEG_REQ thus violating the TLM protocol as specified in the TLM 2.0 LRM (e.g. section 8.2.6) Cheers -Eyck Hi Eyck My mistake, I mean to say for(unsigned int i=0; i<In.size(); ++i) In[i]->invalidate_direct_mem_ptr(...) In my platform, when I just call In->invalidate_direct_mem_ptr(...), I see it reaches to all connected sockets . but you said it will reach only to first bound initiator socket. I am confused here. What is different between In->invalidate_direct_mem_ptr(...) and for(unsigned int i=0; i<In.size(); ++i) In[i]->invalidate_direct_mem_ptr(...) With both the cases, how we should handle nb_transport_bw() so that it reaches only to intended recipients ? Thanks Sumit Share this post Link to post Share on other sites
SumitK 0 Report post Posted March 26 Hi Eyck Please ignore my last thread. It was my mistake. I should use for(unsigned int i=0; i<In.size(); ++i) In[i]->invalidate_direct_mem_ptr(...) and for(unsigned int i=0; i<In.size(); ++i) In[i]->nb_transport_bw() // only is corresponding nb_transport_fw() is received on that In My only remaining point is now wrt nb_transport_bw() calls. For this if I want to make sure that my interconnect model only pass that calls to that initiator socket from which the corresponding nb_transport_fw() call is received, do I need to add the corresponding checks in interconnect model itself before forwarding the transaction using nb_transport_bw() call ? Thanks Sumit Share this post Link to post Share on other sites