11.07.2015 Views

section 7 - Index of

section 7 - Index of

section 7 - Index of

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

the main uses <strong>of</strong> interrupts is to transfer data between OSP memory or registers and aperipheral device. When such an interrupt occurs, a limited context switch with minimaloverhead is ideal. A fast interrupt accomplishes a limited context switch. The processorrelies on a long interrupt when it must accomplish a more complex task to service theinterrupt. Fast interrupts and long interrupts are described in more detail in Section7.3.1.There are many sources for interrupts on the OSP56K family <strong>of</strong> chips, and some <strong>of</strong> thesesources can generate more than one interrupt. The OSP56K family <strong>of</strong> processors featuresa prioritized interrupt vector scheme with 32 vectors to provide fast interrupt service.The interrupt priority structure is discussed in Section 7.3.2. The following listoutlines how the OSP56K processes interrupts:1. A hardware interrupt is synchronized with the OSP clock, and the interruptpending flag for that particular hardware interrupt is set. An interrupt sourcecan have only one interrupt pending at any given time.2. All pending interrupts (external and internal) are arbitrated to select whichinterrupt will be processed. The arbiter automatically ignores any interruptswith an IPL lower than the interrupt mask level in the SR and selects theremaining interrupt with the highest IPL.3. The interrupt controller then freezes the program counter (PC) and fetches twoinstructions at the two interrupt vector addresses associated with the selectedinterrupt.-. 4. The interrupt controller jams the two instructions into the instruction streamand releases the PC, which is used for the next instruction fetch. The nextinterrupt arbitration then begins.If neither instruction is a change <strong>of</strong> program-flow instruction (Le., a JSR), the state <strong>of</strong> themachine is not saved on the stack, and a fast interrupt is executed. A long interruptoccurs if one <strong>of</strong> the interrupt instructions fetched is a JSR instruction. The PC is immediatelyreleased, the SR and the PC are saved in the stack, and the jump instruction controlswhere the next instruction shall be fetched. While either an unconditional jump or aconditional jump can be used to form a long interrupt, they do not store the PC on thestack. Therefore, there is no return path. ./Activities 2 and 3 listed above require two additional control cycles, which effectivelymake the Interrupt pipeline five levels deep.

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

Saved successfully!

Ooh no, something went wrong!