Changes between Version 57 and Version 58 of Writing Rules/Tlmt


Ignore:
Timestamp:
Nov 15, 2008, 1:54:21 PM (15 years ago)
Author:
fpecheux
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Writing Rules/Tlmt

    v57 v58  
    2323= B) Single VCI initiator and single VCI target =
    2424
    25 Figure 1 presents a minimal system containing one single initiator, '''my_initiator''' , and one single
     25Figure 1 presents a minimal TLM-T system containing one single initiator, '''my_initiator''' , and one single
    2626target, '''my_target''' . The '''my_initiator''' module behavior is modeled by
    2727the SC_THREAD  '''execLoop()''', that contains an infinite loop.
     
    3030[[Image(tlmt_figure_1.png, nolink)]]
    3131
    32 Unlike the initiator, the target module has a purely reactive behaviour and is therefore modeled as a call-back function.
    33 In other words, there is no need to use a SC_THREAD : The target behaviour is entirely described by the call-back
     32Unlike the initiator, the target module has a purely reactive behaviour and is therefore modeled as a simple call-back function.
     33In other words, there is no need to use a SC_THREAD for these simple target components: the target behaviour is entirely described by the call-back
    3434function '''my_nb_transport_fw()''',
    3535that is executed when a VCI command packet is received by the target module.
     
    4141
    4242In the proposed example, the initiator module is modeled by the '''my_initiator''' class.
    43 This class inherits from the SystemC '''sc_core::sc_module''' class, that acts as the root class for all TLM-T modules.
     43This class inherits from the standard SystemC '''sc_core::sc_module''' class, that acts as the root class for all TLM-T modules.
    4444
    4545The initiator local time is contained in a member variable named '''m_localTime''', of type '''sc_core::sc_time'''. The
    46 local time can be accessed through the use of the following accessors: '''addLocalTime()''', '''setLocalTime()'''
     46local time can be accessed with the following accessors: '''addLocalTime()''', '''setLocalTime()'''
    4747and '''getLocalTime()'''.
    4848{{{
     
    8181
    8282To send a VCI command packet, the '''execLoop()''' method must use the '''nb_transport_fw()''' method, that is a member
    83 function of the '''p_vci_init''' port. The prototype is the following:
     83function of the '''p_vci_init''' port. The prototype of this method is the following:
    8484{{{
    8585
    8686  tlm::tlm_sync_enum nb_transport_fw               /// sync status
    87   ( soclib_vci_types::vci_payload_type &payload,      ///< VCI payload pointer
     87  ( soclib_vci_types::tlm_payload_type &payload,      ///< VCI payload pointer
    8888    soclib_vci_types::tlmt_phase_type   &phase,       ///< transaction phase
    8989    sc_core::sc_time                   &time);        ///< time