Changes between Version 59 and Version 60 of Writing Rules/Tlmt


Ignore:
Timestamp:
Nov 15, 2008, 3:10:42 PM (15 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Writing Rules/Tlmt

    v59 v60  
    172172
    173173To receive a VCI response packet, a call-back function must be defined as a member function of the
    174 class '''my_initiator'''. This call-back function (named '''my_nb_transport_bw()''' in the example), must be
     174class '''my_initiator'''. This call-back function (named '''vci_rsp_received()''' in the example), must be
    175175declared in the '''my_initiator''' class and
    176176is executed each time a VCI response packet is received on the '''p_vci_init''' port. The function name is not
    177177constrained, but the arguments must respect the following prototype:
    178178{{{
    179   tlm::tlm_sync_enum my_nb_transport_bw                // for resp messages
    180     ( soclib_vci_types::vci_payload_type &payload,     // payload
    181       soclib_vci_types::tlmt_phase_type   &phase,      // transaction phase
     179  tlm::tlm_sync_enum vci_rsp_received                // for resp messages
     180    ( soclib_vci_types::tlm_payload_type &payload,     // payload
     181      soclib_vci_types::tlm_phase_type   &phase,      // transaction phase
    182182      sc_core::sc_time                   &time);       // resp time
    183183}}}
    184 
     184The return value (type tlm::tlm_sync_enum)  must be sytematically set to tlm::TLM_COMPLETED in this implementation
    185185The function parameters are identical to those described in the forward transport function
    186186
    187 The actions executed by the call-back function depend on the response transaction type ('''m_command''' field), as well as
     187In the general case, the actions executed by the call-back function depend on the response transaction type ('''m_command''' field), as well as
    188188the '''pktid''' and '''trdid''' fields.
    189189
    190 In the proposed example :
    191  * In case of of a blocking read , the call-back function updates the local time, and reactivates the suspended thread.
    192  * In case of a non-blocking write, the call-back function does nothing.
    193  
     190For sake of simplicity, in the proposed example the call-back function does not make any distinction between VCI transaction types :
     191
    194192== C.3) Initiator Constructor ==
    195193