Changes between Version 58 and Version 59 of Writing Rules/Tlmt
- Timestamp:
- Nov 15, 2008, 2:37:26 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Writing Rules/Tlmt
v58 v59 86 86 tlm::tlm_sync_enum nb_transport_fw /// sync status 87 87 ( soclib_vci_types::tlm_payload_type &payload, ///< VCI payload pointer 88 soclib_vci_types::tlm t_phase_type &phase, ///< transaction phase88 soclib_vci_types::tlm_phase_type &phase, ///< transaction phase 89 89 sc_core::sc_time &time); ///< time 90 90 }}} … … 95 95 To prepare a VCI packet for sending, the '''execLoop''' function must declare two objects locally, '''payload''' and '''phase'''. 96 96 {{{ 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 }}} 100 A payload of type '''soclib_vci_types::tlm_payload_type''' corresponds to a '''tlmt_vci_transaction'''. 101 It contains three groups of information: 102 * TLM2.0 related fields 103 * TLM-T related fields 104 * VCI related fields 105 The contents of a '''tlmt_vci_transaction''' is defined below: 104 106 {{{ 105 107 class tlmt_vci_transaction … … 118 120 unsigned int m_streaming_width; // 119 121 122 // TLM-T related fields 123 124 bool* m_activity_ptr; 125 sc_core::sc_time* m_local_time_ptr; 126 120 127 // VCI related fields 121 128 … … 124 131 unsigned int m_trd_id; // trdid 125 132 unsigned int m_pkt_id; // pktid 126 127 // TLM-T related fields128 129 bool* m_activity_ptr;130 sc_core::sc_time* m_local_time_ptr;131 132 133 }}} 133 134 … … 135 136 array pointer and its associated size in bytes, and the data array pointer and its associated size in bytes. The byte 136 137 enable 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''' 138 currently done to evaluate the performance degradation incurred by the byte formatting. 139 It is therefore possible that the types of the '''m_data''' and '''m_byte_enable''' of the '''tlmt_vci_transaction''' 138 140 will be changed to '''uint32*''' in a near future. 139 141 140 TheVCI accessors are used to define the VCI transaction type, that can either be '''set_read()''' (for read command),142 Dedicated VCI accessors are used to define the VCI transaction type, that can either be '''set_read()''' (for read command), 141 143 '''set_write()''' (for write command),'''set_locked_read()''' (for atomic locked read), 142 144 and '''set_store_cond()''' (for atomic store conditional). The '''set_src_id()''', '''set_trd_id()''' and '''set_pkt_id()''' functions 143 145 respectively set the VCI source, thread and packet identifiers. 144 146 The following example describes a VCI write command: 145 147 {{{ 146 148 payload.set_address(0x10000000);//ram 0 … … 163 165 164 166 The '''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),167 To implement a blocking transaction (such as a cache line read, where the processor is stalled during the VCI transaction), 166 168 the model designer must use the SystemC '''sc_core::wait(x)''' primitive ('''x''' being of type '''sc_core::sc_event'''): 167 169 the '''execLoop()''' thread is then suspended, and will be reactivated when the response packet is actually received.