Zack63 Posted May 5, 2016 Report Share Posted May 5, 2016 Hello All, I have some confusion on the usage of the generic payload on the backwards path (e.g. AT nb_transport usage). At first glance, I would expect the target to re-use the generic_payload that it receives on the forward path. However, I'm working with a model that creates a new generic_payload on the backwards path. This makes things a bit strange, as I must keep the forward path generic_payload until the end of the transaction. I've looked in the LRM to determine if creation of a new GP by the target is allowed, acceptable, encouraged, etc, but I'm not finding anything obvious. Thanks in advance for comments! In case there is confusion, here is some pseudo code: // initiator sc_module. (Not using simple socket) My_sc_thread() { tlm_generic_payload gp; … cout <<" FW pointers: gp= "<<hex<<showbase<< (unsigned long long)(&gp) <<endl; out->nb_transport_fw(gp,ph,delay); } virtual tlm_sync_enum nb_transport_bw(tlm_generic_payload &gp, tlm_phase &ph, sc_time &t) { cout <<" BW pointers: gp= "<<hex<<showbase<< (unsigned long long)(&gp) <<endl; … } Output (simply showing the generic_payload pointer returned is not the one sent): FW WRITE pointers: gp= 0x7fb4423e5e90 gp.get_data_ptr()= 0x7fb4423e5f40 BW WRITE pointers: gp= 0x774ee0 gp.get_data_ptr()= 0x761f40 Quote Link to comment Share on other sites More sharing options...
apfitch Posted May 6, 2016 Report Share Posted May 6, 2016 I would say that is not within the spirit of TLM2 approximately timed modelling. In particular 11.2.3.5 b ) in IEEE 1666-2011 If there are multiple calls to nb_transport associated with a given transaction instance, one and thesame transaction object shall be passed as an argument to every such call. In other words, a giventransaction instance shall be represented by a single transaction object. Note that the use of nb_transport in the above quote is defined in 11.1.2.4 a) of the same document There are two non-blocking transport methods, nb_transport_fw for use on the forward path, andnb_transport_bw for use on the backward path. Aside from their names and calling direction thesetwo methods have similar semantics. In this document, the italicized term nb_transport is used todescribe both methods in situations where there is no need to distinguish between them. regards Alan Zack63 1 Quote Link to comment Share on other sites More sharing options...
Zack63 Posted May 6, 2016 Author Report Share Posted May 6, 2016 Thanks for replying, I agree ! 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.