Changes between Version 63 and Version 64 of Writing Rules/Tlmt


Ignore:
Timestamp:
Nov 15, 2008, 5:17:19 PM (15 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Writing Rules/Tlmt

    v63 v64  
    44}}}
    55
    6 Authors : Alain Greiner, François Pêcheux, Emmanuel Viaud, Nicolas Pouillon, Aline Vieira de Mello
     6Authors : Alain Greiner, François Pêcheux, Aline Vieira de Mello
    77 
    88[[PageOutline]]
     
    1111
    1212This document is still under development.
     13
    1314It describes the modeling rules for writing TLM-T SystemC simulation models for SoCLib that are
    1415compliant with the new TLM2.0 OSCI standard.
    15 These rules enforce the PDES (Parallel Discrete Event Simulation) principles. Each PDES process involved in
    16 the simulation has its own local time, and PDES processes synchronize through messages piggybacked with time information.
     16These rules enforce the PDES (Parallel Discrete Event Simulation) principles. In the TLM-T approach,
     17we don't use anymore the SystemC global time, as each PDES process involved in
     18the simulation has its own local time. PDES processes (implemented as SC_THREADS) synchronize through
     19messages piggybacked with time information.
    1720Models complying to these rules can be used with the "standard" OSCI simulation engine (SystemC 2.x) and
    18 the TLM2.0 protocol, but can
    19 also be used also with others simulation engines, especially distributed, parallelized simulation engines.
     21the TLM2.0 protocol, but can also be used also with others simulation engines, especially distributed, parallelized simulation engines.
     22
     23The examples presented below use the VCI/OCP communication protocol selected by the SoCLib project,
     24but the TLM-T approach described here is very flexible, and is not limited to the VCI/OCP communication protocol.
    2025
    2126The interested user should also look at the [WritingRules/General general SoCLib rules].
     
    2328= B) Single VCI initiator and single VCI target =
    2429
    25 Figure 1 presents a minimal TLM-T system containing one single initiator, '''my_initiator''' , and one single
    26 target, '''my_target''' . The '''my_initiator''' module behavior is modeled by
     30Figure 1 presents a minimal system containing one single VCI initiator, '''my_initiator''' , and one single
     31VCI target, '''my_target''' . The '''my_initiator''' module behavior is modeled by
    2732the SC_THREAD  '''execLoop()''', that contains an infinite loop.
    28 The call-back function '''my_nb_transport_bw()''' is executed when a VCI response packet is received by the initiator module.
     33The call-back function '''vci_rsp_received()''' is executed when a VCI response packet is received by the initiator module.
    2934
    3035[[Image(tlmt_figure_1.png, nolink)]]
    3136
    3237Unlike the initiator, the target module has a purely reactive behaviour and is therefore modeled as a simple call-back function.
    33 In other words, there is no need to use a SC_THREAD for these simple target components: the target behaviour is entirely described by the call-back
    34 function '''my_nb_transport_fw()''',
    35 that is executed when a VCI command packet is received by the target module.
     38In other words, there is no need to use a SC_THREAD for this simple target component: the target behaviour is entirely described by the call-back
     39function '''vci_cmd_received()''', that is executed when a VCI command packet is received by the target module.
    3640
    3741The VCI communication channel is a point-to-point bi-directionnal channel, encapsulating two separated uni-directionnal
     
    4953  sc_core::sc_time m_localTime;                     // the initiator local time
    5054  ...
    51   void addLocalTime(sc_core::sc_time t);            // add a value to the local time
     55  void addLocalTime(sc_core::sc_time t);            // add an increment to the local time
    5256  void setLocalTime(sc_core::sc_time& t);           // set the local time
    5357  sc_core::sc_time getLocalTime(void);              // get the local time
    5458}}}
    5559
    56 The initiator activity corresponds to the boolean member '''m_activity''' that indicates if the initiator is currently active
    57 (i.e. '''true''', wants to participate in the arbitration in the interconnect) or inactive (i.e. '''false''', does not want
     60The initiator activity corresponds to the boolean member '''m_activity''' that indicates if the initiator is currently active.
     61This boolean variable is used by the arbitration threads i.e. '''true''', wants to participate in the arbitration in the interconnect) or inactive (i.e. '''false''', does not want
    5862to participate in the arbitration in the interconnect). The corresponding access functions are '''setActivity()''' and '''getActivity()'''.
    5963{{{