Changes between Version 40 and Version 41 of Writing Rules/Tlmt


Ignore:
Timestamp:
Feb 19, 2008, 9:22:03 PM (16 years ago)
Author:
fpecheux
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Writing Rules/Tlmt

    v40 v41  
    1111
    1212This document describes the modeling rules for writing TLM-T SystemC simulation models for SoCLib.
    13 These rules enforce the PDES (Parallel Discrete Event Simulation) principles. Each PDES process involved in the simulation has its own local time, and PDES processes synchronize through messages piggybacked with time information. The process time, as well as other useful process attributes, is contained in a C++ structure called a '''thread context'''.
     13These rules enforce the PDES (Parallel Discrete Event Simulation) principles. Each PDES process involved in the simulation has its own local time, and PDES processes synchronize through messages piggybacked with time information.
    1414Models complying to these rules can be used with the "standard" OSCI simulation engine (SystemC 2.x), but can also be used also with others simulation engines, especially distributed, parallelized simulation engines.
    1515
     
    1818= B) Single VCI initiator and single VCI target =
    1919
    20 Figure 1 presents a minimal system containing one single initiator, '''my_initiatorVciSimpleInitiator''' , and one single target, '''my_targetVciSimpleTarget''' . The '''my_initiatorVciSimpleInitiator''' module behavior is modeled by the SC_THREAD  '''execLoop()''', that contains an infinite loop.  The call-back function '''rspReceived()''' is executed when a VCI response packet is received by the initiator module.
     20Figure 1 presents a minimal system containing one single initiator, '''!VciSimpleInitiator''' , and one single target, '''!VciSimpleTarget''' . The '''!VciSimpleInitiator''' module behavior is modeled by the SC_THREAD  '''execLoop()''', that contains an infinite loop.  The call-back function '''rspReceived()''' is executed when a VCI response packet is received by the initiator module.
    2121
    2222[[Image(tlmt_figure_1.png, nolink)]]
     
    3030= C) VCI initiator Modeling =
    3131
    32 In the proposed example, the initiator module is modeled by the '''my_initiator''' class. This class inherits from the '''!BaseModule''' class, that acts as the root class for all TLM-T modules. As there is only one thread in this module, there is only one member variable '''m_time''' of type '''tlmt_time''', corresponding to the PDES process local time ('''H''' on the figure). This '''m_time''' object can be accessed through the '''getTime()''', '''addTime()''' and '''setTime()''' methods.
     32In the proposed example, the initiator module is modeled by the '''!VciSimpleInitiator''' class. This class inherits from the '''soclib::tlmt::BaseModule''' class, that acts as the root class for all TLM-T modules. The process time, as well as other useful process attributes, is contained in a C++ structure called a '''tlmt_thread_context'''.As there is only one thread in this module, there is only one member variable '''c0''' of type '''tlmt_core::tlmt_thread_context'''. '''c0''' mostly corresponds to the PDES process local time ('''H''' on the figure). Time associated to the '''c0''' object can be accessed through the getter function '''time()''', and setter functions '''set_time()''' and '''update_time()'''.
    3333
    3434The '''execLoop()''' method, describing the initiator activity must be declared as a member function of the '''my_initiator''' class.