GSGPSocket Notes

Notes for GSGPSocket usage

GenericProtocol (GP) definitions

This section should clarify some open (not yet defined) questions about the usage of the Generic Protocol. This is needed to make the automatic conversion between different implementations possible with usage of a not too complex GPSocket configuration.

  • Each 'Valid' phase has to be acknowledged.
  • Write command: You may use one or more Data phases (using either BytesValid or BurstNumber (the latter is future use)).
  • Read command: You may use one or more Response phases (using either BytesValid or BurstNumber (the latter is future use)).
  • A write (with one or more Data phases) may be finished with (only) one Response phase. (The configuration parameter use_wr_resp is needed to specify whether the slave does send this response and whether the master understands it.)
  • The response phase (Response(...)) must be called with a transaction whose SResp has been set (setSResp(...)) unequal Generic_SRESP_NULL.

When connecting OSCI devices with GSGPSocket devices

  • Take care to set the BytesValid within the phase. Otherwise the socket will not send the transaction e.g. to a non-GP-master.

BytesValid bug in GreenBus

The BytesValid information need to be transfered within the phase, not within the transaction. Accordingly the access functions have been moved to the phase.

Manual configuration of GSGPSockets

If you like to apply a manual configuration different from the default GSGPConfig and its abilities, do the following:

  • Apply a GSGPConfig using the set_config(GSGPConfig) function, e.g.

  1.    GSGPSocketConfig cnf;
  2.     cnf.use_wr_resp = false;
  3.     bidir_port.set_config(cnf);
  • Change the config as you like and apply it again directly to the GreenSocket, e.g.

  1.    gs::socket::config<tlm::tlm_base_protocol_types> gs_cnf = bidir_port.get_recent_config(0);
  2.     std::cout << "Use additional mandatory extension 'cacheable'." << std:: endl;
  3.     gs_cnf.use_mandatory_extension<cacheable>();
  4.     ((gs::socket::extension_support_base<tlm::tlm_base_protocol_types>*)&bidir_port)->set_config(gs_cnf);
  • Notice that mandatory extensions will not bind to GSGPSockets.

Alternative: derive from GSGPConfig and apply this one.