Changes between Version 23 and Version 24 of Writing Rules/Tlmt


Ignore:
Timestamp:
Dec 27, 2007, 11:22:57 AM (16 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Writing Rules/Tlmt

    v23 v24  
    267267
    268268As 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 :
    269  * 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.
    270  * The '''cmdReceived()''' call-back function returns a date to the arbitration thread. This date is used to update the arbitration thread local time. 
     269 * The '''cmdReceived()''' function sends a VCI response packet with a date to the source initiator, through the '''!VciVgmn''' response network. The corresponding date can be used to update the initiator local clock.
     270 * The '''cmdReceived()''' function returns a date to the arbitration thread. This date is used to update the arbitration thread local time. 
    271271
    272272[[Image(tlmt_figure_4.png, nolink)]]
     
    297297}}}
    298298
    299 In the Parallel Discrete Event Simulation, the pessimistic approach suppose that any PDES process can update his local time only when he has received messages  on all input ports with dates larger than his local time.
    300 Therefore, a SC_THREAD modeling the behavior of a module containing an '''!IrqInPort''' should in principle wait a dated packet on this port before executing instruction and updating the local time. Such behavior would be very inefficient, and could create dead-lock situations.
     299In the Parallel Discrete Event Simulation, the pessimistic approach suppose that any PDES process is not allowed to update his local time until he has received messages  on all input ports with dates larger than his local time.
     300Therefore, a SC_THREAD modeling the behavior of a processor containing an '''!IrqInPort''' should in principle wait a dated packet on this interrupt port before executing instructions. Such behavior would be very inefficient, and could create dead-lock situations.
    301301
    302302The recommended policy for handling interrupts is the following:
     
    329329private:
    330330    tlmt_Time  m_time;  // local clock
    331     bool  m_irqset;  // pending interrupt request
     331    bool  m_irqpendig;  // pending interrupt request
    332332    sc_time  m_irqtime;  // irq date
    333333    uint32_t  m_counter;  // iteration counter
     
    340340        ...
    341341        // test interrupts
    342         if (m_irqset && (m_irqtime <= m_time.getTime())) {
     342        if (m_irqpending && (m_irqtime <= m_time.getTime())) {
    343343                                        // traitement interrupt
    344344                                        }
     
    357357     void  irqReceived(bool val, sc_time time)
    358358    {
    359     m_irqset = val;
     359    m_irqpending = val;
    360360    m_irqtime = time;
    361361    } // end irqReceived()