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


Ignore:
Timestamp:
Nov 15, 2008, 2:37:26 PM (18 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Writing Rules/Tlmt

    v58 v59  
    8686  tlm::tlm_sync_enum nb_transport_fw               /// sync status
    8787  ( soclib_vci_types::tlm_payload_type &payload,      ///< VCI payload pointer
    88     soclib_vci_types::tlmt_phase_type   &phase,       ///< transaction phase
     88    soclib_vci_types::tlm_phase_type   &phase,       ///< transaction phase
    8989    sc_core::sc_time                   &time);        ///< time
    9090}}}
    … …  
    9595To prepare a VCI packet for sending, the '''execLoop''' function must declare two objects locally, '''payload''' and '''phase'''.
    9696{{{
    97   soclib_vci_types::vci_payload_type payload;
    98   soclib_vci_types::tlmt_phase_type phase;
    99 }}}
    100 A payload of type '''soclib_vci_types::vci_payload_type''' corresponds to a '''tlmt_vci_transaction''' and thus
    101 contains three kinds of structure fields: TLM2.0 related fields,VCI related fields, and TLM-T related fields.
    102 
    103 The contents of a '''tlmt_transaction''' is defined below:
     97  soclib_vci_types::tlm_payload_type payload;
     98  soclib_vci_types::tlm_phase_type phase;
     99}}}
     100A payload of type '''soclib_vci_types::tlm_payload_type''' corresponds to a '''tlmt_vci_transaction'''.
     101It contains three groups of information:
     102 * TLM2.0 related fields
     103 * TLM-T related fields
     104 * VCI related fields
     105The contents of a '''tlmt_vci_transaction''' is defined below:
    104106{{{
    105107class tlmt_vci_transaction
    … …  
    118120  unsigned int         m_streaming_width;       //
    119121
     122  // TLM-T related fields
     123 
     124  bool*                m_activity_ptr;
     125  sc_core::sc_time*    m_local_time_ptr;
     126
    120127  // VCI related fields
    121128 
    … …  
    124131  unsigned int         m_trd_id;                // trdid
    125132  unsigned int         m_pkt_id;                // pktid
    126 
    127   // TLM-T related fields
    128  
    129   bool*                m_activity_ptr;
    130   sc_core::sc_time*    m_local_time_ptr;
    131 
    132133}}}
    133134
    … …  
    135136array pointer and its associated size in bytes, and the data array pointer and its associated size in bytes. The byte
    136137enable array allows to build versatile packets thanks to a powerful but slow data masking scheme. Further experiments are
    137 currently done. It is likely that the types of the '''m_data''' and '''m_byte_enable''' of the '''tlmt_vci_transaction'''
     138currently done to evaluate the performance degradation incurred by the byte formatting.
     139It is therefore  possible that the types of the '''m_data''' and '''m_byte_enable''' of the '''tlmt_vci_transaction'''
    138140will be changed to '''uint32*''' in a near future.
    139141
    140 The VCI accessors are used to define the VCI transaction type, that can either be '''set_read()''' (for read command),
     142Dedicated VCI accessors are used to define the VCI transaction type, that can either be '''set_read()''' (for read command),
    141143'''set_write()''' (for write command),'''set_locked_read()''' (for atomic locked read),
    142144and '''set_store_cond()''' (for atomic store conditional). The '''set_src_id()''', '''set_trd_id()''' and '''set_pkt_id()''' functions
    143145respectively set the VCI source, thread and packet identifiers.
    144 
     146The following example describes a VCI write command:
    145147{{{
    146148    payload.set_address(0x10000000);//ram 0
    … …  
    163165
    164166The '''nb_transport_fw()''' function is non-blocking.
    165 To implement a blocking transaction (such as a cache line read, where the processor is ''frozen'' during the VCI transaction),
     167To implement a blocking transaction (such as a cache line read, where the processor is stalled during the VCI transaction),
    166168the model designer must use the SystemC '''sc_core::wait(x)''' primitive ('''x''' being of type '''sc_core::sc_event'''):
    167169the '''execLoop()''' thread is then suspended, and will be reactivated when the response packet is actually received.