Chapter 2. Program Organization28 PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual GFK-2950C2.3.5 Interrupt Block SchedulingYou can select one of two types of interrupt block scheduling at the target level:▪ Normal block scheduling allows you to associate a maximum of 64 I/O and Module Interruptsand 16 Timed Interrupts. With normal block scheduling, all interrupt-triggered blocks have equalpriority. This is the default scheduling mode.▪ Preemptive block scheduling allows you to associate a maximum of 32 interrupt triggers. Withpreemptive block scheduling, each trigger can be assigned a relative priority.Normal Block SchedulingInterrupt-driven logic has the highest priority of any user logic in the system. The execution of a blocktriggered from an interrupt preempts the execution of the normal CPU sweep activities. Execution ofthe normal CPU sweep activities is resumed after the interrupt-driven block execution completes.If the CPU receives one or more interrupts while executing an interrupt block, it places the incominginterrupts into the queue while it finishes executing the current interrupt block. Timed interruptdriven blocks are queued ahead of I/O or Module driven blocks. I/O or Module interrupt driven blocksare queued in the order in which the interrupts are received. If an interrupt driven block is already inthe queue, additional interrupts that occur for this block are ignored.Preemptive Block SchedulingPreemptive scheduling allows you to assign a priority to each interrupt trigger. The priority valuesrange from 1 to 16, with 1 being the highest. A single block can have multiple interrupts withdifferent priorities or the same priorities.An incoming interrupt is handled according to its priority compared to that of the currently executingblock as follows:▪ If an incoming interrupt has a higher priority than the interrupt associated with the block that iscurrently executing, the currently executing block is stopped and put in the interrupt queue. Theblock associated with the incoming interrupt begins executing.▪ If an incoming interrupt has the same priority as the interrupt trigger associated with the blockthat is currently executing, that block continues to execute and the incoming interrupt is placedin the queue.▪ If an incoming interrupt has a lower priority than the interrupt associated with the block that iscurrently executing, the incoming interrupt is placed in the queue.When the CPU completes the execution of an interrupt block, the block associated with the interrupttrigger that has the highest priority in the queue begins execution — or resumes execution if theblock's execution was preempted by another interrupt block and was placed in the queue.If multiple blocks in the queue have the same interrupt priority, their execution order is notdeterministic.Note: Certain functions, such as DOIO, BUS_RD, BUS_WRT, COMMREQ, SCAN_SET_IO, and someSVC_REQs may cause a block to yield to another queued block that has the same priority