Changes between Version 44 and Version 45 of Writing Rules/Tlmt
- Timestamp:
- Feb 19, 2008, 9:54:11 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Writing Rules/Tlmt
v44 v45 9 9 10 10 = A) Introduction = 11 12 Important note: this document is currently being updated and deeply modified. A stable version will be available on February 22, 2008. 11 13 12 14 This document describes the modeling rules for writing TLM-T SystemC simulation models for SoCLib. … … 102 104 The constructor of the class '''!VciSimpleInitiator''' must initialize all the member variables, including the '''p_vci''' port. The '''rspReceived()''' call-back function being executed in the context of the thread sending the response packet, a link between the '''p_vci''' port and the call-back function must be established. Moreover, the '''p_vci''' port must contain a pointer to the initiator thread context '''c0'''. 103 105 104 The '''!VciInitiator''' constructor must be called with the following arguments:106 The '''!VciInitiator''' constructor for the '''p_vci_''' object must be called with the following arguments: 105 107 {{{ 106 108 p_vci("vci", new tlmt_core::tlmt_callback<VciSimpleInitiator,soclib::tlmt::vci_rsp_packet<vci_param> *>( … … 112 114 The SystemC simulation engine behaves as a cooperative, non-preemptive multi-tasks system. Any thread in the system must stop execution after at some point, in order to allow the other threads to execute. With the proposed approach, a TLM-T initiator will never stop if it does not execute blocking communication (such as a processor that has all code and data in the L1 caches). 113 115 114 To solve this problem, it is necessary to define - for each initiator module- a '''lookahead''' parameter. This parameter defines the maximum number of cycles that can be executed by the thread before it stops. The '''lookahead''' parameter allows the system designer to bound the de-synchronizationbetween threads.115 116 A small value for this parameter result in a better timing accuracy for the simulation, but implies a larger number of context switch, and a slower simulation speed.116 To solve this issue, it is necessary to define - for each initiator module- a '''lookahead''' parameter. This parameter defines the maximum number of cycles that can be executed by the thread before it is automatically stopped. The '''lookahead''' parameter allows the system designer to bound the de-synchronization time interval between threads. 117 118 A small value for this parameter results in a better timing accuracy for the simulation, but implies a larger number of context switches, and a slower simulation speed. 117 119 118 120 == C.4) VCI initiator example ==