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)
cout <<" FW pointers: gp= "<<hex<<showbase<< (unsigned long long)(&gp) <<endl;
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