244 | | The VCI interconnect used for the TLM-T simulation is a generic simulation model, named '''VciVgmn'''. The two main parameters are the number of initiators, and the number of targets. |
| 244 | The VCI interconnect used for the TLM-T simulation is a generic simulation model, named '''VciVgmn'''. |
| 245 | The two main parameters are the number of initiators, and the number of targets. In TLM-T simulation, |
| 246 | we don't want to reproduce the cycle-accurate behavior of a particular interconnect. We only want to simulate the contention when several VCI intitiators try to reach the same VCI target. |
| 247 | Therefore, the network is actually modeled as a cross-bar : In a physical network such as the multi-stage network described in Figure 2.a, conflicts can appear at any intermediate switch. In the '''VciVgmn''' network described in Figure 2.b, conflicts can only happen at the output ports. It is possible to model to specify a specific latency for each input/output couple. As in most physical interconnects, the general arbitration policy is round-robin. |
| 248 | |
| 249 | |
| 250 | |
| 251 | |
| 252 | |
| 253 | |
248 | | == E.2) Target local time == |
| 257 | A in most physical network on chip, there is actually two fully independent networks for command packets and response packets. There is a routing function for each input port, and an arbitration function for each output port, but the two networks are not symmetrical : |
| 258 | * For the command network, the arbitration policy is distributed: there is one arbitration thread for each output port (i.e. one arbitration thread for each VCI target). Each arbitration thread is modeled by a SC_THREAD, and contain a local clock. |
| 259 | * For the response network, there is no conflicts, and there is no need for arbitration. Therefore, there is no thread (and no local time) in the response network that is implemented by simple function calls. |
| 260 | |
| 261 | This is illustrated in Figure 3 for a network with 2 initiators and three targets : |
| 262 | As there is generally no thread attached to a in the physical interconnects, there |
| 263 | |
| 264 | |
| 265 | == E.2) VCI initiators and targets synchronisations == |
| 266 | |
| 267 | As described in sections B & C, each VCI initiator TLM-T module contains a thread and a local clock. But, in order to increase the TLM-T simulation speed, the VCI targets are generally described by reactive call-back functions. Therefore, there is no thread, and no local clock in the TLM-T module describing a VCI target. For a VCI target, the local clock is actually the clock associated to the corresponding arbitration thread contained in the '''VciVgmn''' module. |
| 268 | |
| 269 | As described in Figure 4, when a VCI command packet - sent by the corresponding arbitration thread - is received by a VCI target, two synchronization mechanisms are activated : |
| 270 | * A VCI response packet with a date is sent to the source initiator, through the '''VciVgmn''' response network. The corresponding date can be used to update the initiator local clock. |
| 271 | * The '''cmdReceived()''' call-back function returns a date to the arbitration thread. This date is used to update the arbitration thread local time. |