Changes between Version 8 and Version 9 of Writing Rules/Tlmt
- Timestamp:
- Dec 25, 2007, 3:24:13 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Writing Rules/Tlmt
v8 v9 244 244 = F) Interruption modeling = 245 245 246 Interrupts are asynchronous events that are not transported by the VCI network. 247 Each interrupt line is modeled by a specific point to point, uni-directional channel. 248 It use two ports of type ''!'IrqOutPort''' and '''!IrqinPort''' that must be declared as member variables of the 249 source ans destination modules respectively. 250 251 252 253 254 246 255 == F.1) Source modeling == 247 256 257 The source module (named '''my_source''' in this example) must contain a member variable '''p_irq''' of type '''!IrqOutPort'''. To activate, or desactivate an interruption, the source module must use the '''irqSend()''' method, that is a member function of the '''!IrqOutPort''' class. Those interrupt packets transport both a Boolean, and a date. The '''irqSend()''' prototype is defined as follows : 258 {{{ 259 void irqSend( bool val, 260 sc_time time) 261 }}} 262 248 263 == F.2) Destination modeling == 249 264 250 == F.3) processor with interrupt example == 251 265 In the Parallel Discrete Event Simulation, the pessimistic approach suppose that any PDES can update his local time only when he knows that all messages received on the input ports have dates larger than his local time. 266 Therefore, a SC_THRED modeling a 267 268 == F.3) Processor with interrupt example == 269 270 {{{ 252 271 class my_processor : Tlmt::BaseModule { 253 272 public: … … 301 320 } // end irqReceived() 302 321 } // end class my_processor 303 304 322 }}} 323