section 7 - Index of

section 7 - Index of section 7 - Index of

11.07.2015 Views

MAINPROGRAMMEMORYINTERRUPT SYNCHRONIZEDAND RECOGNIZEDAS PENDING_ADDITIONAL INTERRUPTSDISABLED FAST INTERRUPT DURINGn1n2it==~C=~):""-'------J::====~~-.--l1--__ n_3 __--fn4INTERRUPTS- 1-----=:-----1RE-ENABLED { n5ADDITIONAL INTERRUPTSDISABLED DURING I n7FAST INTERRUPT I----n-a-----it---n~6r-JF~-_____ .l::::::=~~_.-lINTERRUPTS- I----n-g----fRE-ENABLED-ii = INTERRUPT INSTRUCTIONn = NORMAL INSTRUCTION(a) Instruction Fetches from Memory.---INTERRUPT SYNCHRONIZED ANDRECOGNIZED AS PENDING.--- INTERRUPTS RE-ENABLED61cyeINTERRUPT CONTROL CYCLE 1iiINTERRUPT CONTROL CYCLE 2iiFETCHn1n2 ii1 ii2 n3 n4 n5n6ii1ii2DECODEn1 n2 ii1 ii2 n3 n4n5n6ii1ii2EXECUTEn1 n2 ii1 ii2 n3n4n5n6ii1ii2INSTRUCTION CYCLE COUNT 12 3 4 5 6 78 9101112nINTERRUPTINTERRUPT INSTRUCTION WORD= NORMAL INSTRUCTION WORD(b) Program Controller PipelineFigure 7-9 Two Consecutive Fast Interrupts

6. The fast interrupt returns without an RT/'7. Normal instruction fetching resumes using the PC following the completion ofthe fast interrupt routine.8. A fast interrupt is not interruptible.9. A JSR instruction within the fast interrupt routine forms a long interrupt routine.10. The primary application is to move data between memory and I/O devices.The execution of a long interrupt routine always conforms to the following rules:1. A JSR to the starting address of the interrupt service routine is located at oneof the two interrupt vector addresses.2. During execution of the JSR instruction, the PC and SR are stacked. The interruptmask bits of the SR are updated to mask interrupts of the same or lowerpriority. The loop flag, trace bit, double precision multiply mode bit, and scalingmode bits are reset.3. The first instruction word of the next interrupt service (of higher IPL) will reachthe decoder only after the decoding of at least four instructions following thedecoding of the first instruction of the previous interrupt.-4. The interrupt service routine can be interrupted - i.e., nested interrupts aresupported.5. The long interrupt routine, which can be any length, should be terminated byan RTI, which restores the PC and SR from the stack.Figure 7-10 illustrates the effect of a long interrupt routine on the instruction pipeline. Ashort JSR (a JSR with 12-bit absolute address) is used to form the long interrupt routine.For this example, word 6 of the long interrupt routine is an RT/' The point at which interruptsare re-enabled and subsequent interrupts are allowed is shown to illustrate thenon-interruptible nature of the early instructions in the long interrupt service routine.Either one of the two instructions of the fast interrupt can be the JSR instruction thatforms the long interrupt. Figure 7-11 and Figure 7-12 show the two possible cases. If thefirst fast interrupt vector instruction is the JSR, the second instruction is never used.A REP instruction and the instruction that follows it are treated as a Single two-wordinstruction, regardless of how many times it repeats the second instruction of the pair.Instruction fetches are suspended and will be reactivated only after the LC is decre-

6. The fast interrupt returns without an RT/'7. Normal instruction fetching resumes using the PC following the completion <strong>of</strong>the fast interrupt routine.8. A fast interrupt is not interruptible.9. A JSR instruction within the fast interrupt routine forms a long interrupt routine.10. The primary application is to move data between memory and I/O devices.The execution <strong>of</strong> a long interrupt routine always conforms to the following rules:1. A JSR to the starting address <strong>of</strong> the interrupt service routine is located at one<strong>of</strong> the two interrupt vector addresses.2. During execution <strong>of</strong> the JSR instruction, the PC and SR are stacked. The interruptmask bits <strong>of</strong> the SR are updated to mask interrupts <strong>of</strong> the same or lowerpriority. The loop flag, trace bit, double precision multiply mode bit, and scalingmode bits are reset.3. The first instruction word <strong>of</strong> the next interrupt service (<strong>of</strong> higher IPL) will reachthe decoder only after the decoding <strong>of</strong> at least four instructions following thedecoding <strong>of</strong> the first instruction <strong>of</strong> the previous interrupt.-4. The interrupt service routine can be interrupted - i.e., nested interrupts aresupported.5. The long interrupt routine, which can be any length, should be terminated byan RTI, which restores the PC and SR from the stack.Figure 7-10 illustrates the effect <strong>of</strong> a long interrupt routine on the instruction pipeline. Ashort JSR (a JSR with 12-bit absolute address) is used to form the long interrupt routine.For this example, word 6 <strong>of</strong> the long interrupt routine is an RT/' The point at which interruptsare re-enabled and subsequent interrupts are allowed is shown to illustrate thenon-interruptible nature <strong>of</strong> the early instructions in the long interrupt service routine.Either one <strong>of</strong> the two instructions <strong>of</strong> the fast interrupt can be the JSR instruction thatforms the long interrupt. Figure 7-11 and Figure 7-12 show the two possible cases. If thefirst fast interrupt vector instruction is the JSR, the second instruction is never used.A REP instruction and the instruction that follows it are treated as a Single two-wordinstruction, regardless <strong>of</strong> how many times it repeats the second instruction <strong>of</strong> the pair.Instruction fetches are suspended and will be reactivated only after the LC is decre-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!