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


Ignore:
Timestamp:
Nov 14, 2008, 2:00:34 PM (18 years ago)
Author:
fpecheux
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Writing Rules/Tlmt

    v56 v57  
    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
    26 target, '''!my_target''' . The '''!my_initiator''' module behavior is modeled by
     25Figure 1 presents a minimal system containing one single initiator, '''my_initiator''' , and one single
     26target, '''my_target''' . The '''my_initiator''' module behavior is modeled by
    2727the SC_THREAD  '''execLoop()''', that contains an infinite loop.
    2828The call-back function '''my_nb_transport_bw()''' is executed when a VCI response packet is received by the initiator module.
    … …  
    4040= C) VCI initiator Modeling =
    4141
    42 In 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.
     42In the proposed example, the initiator module is modeled by the '''my_initiator''' class.
     43This class inherits from the 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
    … …  
    6565
    6666The '''execLoop()''' method, describing the initiator behaviour must be declared as a member function of
    67 the '''!my_initiator''' class.
    68 
    69 Finally, the class '''!my_initiator''' must contain a member variable '''p_vci_init''', of type '''tlmt_simple_initiator_socket'''.
     67the '''my_initiator''' class.
     68
     69Finally, the class '''my_initiator''' must contain a member variable '''p_vci_init''', of type '''tlmt_simple_initiator_socket'''.
    7070This member variable represents the VCI initiator port. It has 3 template parameters, two of which are used to help
    7171connecting the response callback function ('''my_initiator''' in the example, first template parameter) to the port and
    … …  
    7373('''soclib_vci_types''' in the following example, third template parameter). '''soclib_vci_types''' is indeed a C++ structure containing two
    7474typedef: the first typedef defines the payload type as VCI, and the other defines the TLM phase type. The phase type can either
    75 be '''!TLMT_CMD''' (i.e. the transaction indicates the emission of a command by an initiator and its reception by a target),
    76 '''!TLMT_RSP''' (i.e. the transaction indicates the emission of a response by a target and its reception by an initiator),
    77 or '''!TLMT_INFO''' (i.e. a TLM-T transaction emitted by one side of a link (vci, irq or fifo) to get information such as time
     75be '''TLMT_CMD''' (i.e. the transaction indicates the emission of a command by an initiator and its reception by a target),
     76'''TLMT_RSP''' (i.e. the transaction indicates the emission of a response by a target and its reception by an initiator),
     77or '''TLMT_INFO''' (i.e. a TLM-T transaction emitted by one side of a link (vci, irq or fifo) to get information such as time
    7878and activity on the other side of the link).
    7979
    … …  
    170170
    171171To receive a VCI response packet, a call-back function must be defined as a member function of the
    172 class '''!my_initiator'''. This call-back function (named '''my_nb_transport_bw()''' in the example), must be
     172class '''my_initiator'''. This call-back function (named '''my_nb_transport_bw()''' in the example), must be
    173173declared in the '''my_initiator''' class and
    174174is executed each time a VCI response packet is received on the '''p_vci_init''' port. The function name is not
    … …  
    192192== C.3) Initiator Constructor ==
    193193
    194 The constructor of the class '''!my_initiator''' must initialize all the member variables, including
     194The constructor of the class '''my_initiator''' must initialize all the member variables, including
    195195the '''p_vci_init''' port. The '''my_nb_transport_bw()''' call-back function being executed in the context of the thread sending
    196196the response packet, a link between the '''p_vci_init''' port and the call-back function must be established.
    … …  
    480480In the proposed example, the target handles all VCI commands in the same way. To simplify the model, there is no real error management.
    481481
    482 The class '''!my_target''' inherits from the class '''sc_core::sc_module'''. The class '''!my_target''' contains a member
     482The class '''my_target''' inherits from the class '''sc_core::sc_module'''. The class '''my_target''' contains a member
    483483variable '''p_vci_target''' of type '''tlmt_simple_target_socket'''. This object has 3 template parameters, that are identical to
    484484those used for declaring initiator ports (see above).
    … …  
    513513== D.3) Target Constructor ==
    514514
    515 The constructor of the class '''!my_target''' must initialize all the member variables, including
     515The constructor of the class '''my_target''' must initialize all the member variables, including
    516516the '''p_vci_target''' port. The '''my_nb_transport_fw()''' call-back function being executed in the context of the thread sending
    517517the command packet, a link between the '''p_vci_target''' port and the call-back function must be established.