Changes between Version 23 and Version 24 of Writing Rules/Tlmt
- Timestamp:
- Dec 27, 2007, 11:22:57 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Writing Rules/Tlmt
v23 v24 267 267 268 268 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 : 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-backfunction 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. 271 271 272 272 [[Image(tlmt_figure_4.png, nolink)]] … … 297 297 }}} 298 298 299 In the Parallel Discrete Event Simulation, the pessimistic approach suppose that any PDES process can update his local time only whenhe 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.299 In 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. 300 Therefore, 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. 301 301 302 302 The recommended policy for handling interrupts is the following: … … 329 329 private: 330 330 tlmt_Time m_time; // local clock 331 bool m_irq set; // pending interrupt request331 bool m_irqpendig; // pending interrupt request 332 332 sc_time m_irqtime; // irq date 333 333 uint32_t m_counter; // iteration counter … … 340 340 ... 341 341 // test interrupts 342 if (m_irq set&& (m_irqtime <= m_time.getTime())) {342 if (m_irqpending && (m_irqtime <= m_time.getTime())) { 343 343 // traitement interrupt 344 344 } … … 357 357 void irqReceived(bool val, sc_time time) 358 358 { 359 m_irq set= val;359 m_irqpending = val; 360 360 m_irqtime = time; 361 361 } // end irqReceived()