Interrupts Wrap-Up, Midterm 2 Review
Tom Kelliher, CS26
Oct. 31, 1996
- Collect homework.
- Finish last lecture.
Hardware Organization:
- Seven priority levels.
- Three-bit mask level in status word. Mask requests at same
or lower level.
- Level seven is unmaskable.
- When interrupt is accepted:
- Processor enters supervisor state.
- Status word pushed on supervisor stack.
- PC pushed on supervisor stack.
- Mask level raised to level of interrupt.
- If auto-vectoring, get handler address from fixed location in
vector table. Otherwise, read vector number from D7--D0 and get handler
address from vector table. Load PC with handler address.
- Auto-vectoring: what and why?
- Handler executes RTE to return, restoring PC, PS, and privilege
level.
- Vector table starts at address 0.
- Each entry in vector table is four bytes.
- Assume keyboard has no internal buffer, so processor has to provide
software buffer.
- Assume type-ahead is nice.
- Assume polling is bad.
- Assume keyboard is ``dumb,'' so auto-vectoring is used.
- Keyboard uses IRQ2, which uses location 0x68 (auto-vector 2) in
vector table
- Keyboard is memory mapped, using locations DATAIN, DATAOUT, and
STATUS.
- Keyboard buffer is LINE.
INTVEC EQU $68 // Location in vector table.
INTEN EQU $40 // Keyboard int. enable.
INTDIS EQU 0 // Keyboard int. disable.
NEWPS EQU $0100 // 68000 int. mask.
RTRN EQU $0D // ASCII for carriage return.
...
MOVE.L #READ, INTVEC // Initialization.
MOVE.L #LINE, PNTR
MOVE.B #INTEN, STATUS
MOVE.L #NEWPS, -(A7) // Load correct mask and PC
MOVE.L #MAIN, -(A7) // and enter user privilege level.
RTE
....
MAIN ...
// Keyboard interrupt handler.
READ MOVEA.L A0, -(A7) // Save register.
MOVEA.L PNTR, A0
MOVE.B DATAIN, (A0)+
MOVEA.L A0, PNTR
CMPI.B #RTRN, -1(A0)
BNE DONE
MOVE.B #INTDIS, STATUS // Process line of input.
BSR TEXT
DONE MOVEA.L (A7)+, A0
RTE
- Combinational logic circuits: gates, truth tables, SOP form, bit-wise
operations and masking.
- Circuit synthesis and Karnaugh maps.
- Multiplexers, decoders.
- Sequential circuits: latches, types of flip-flops, registers,
register files.
- Timing: propagation delays, set-up, hold.
- Instruction execution:
- Instruction cycle.
- Addressing modes.
- Internal CPU bus structures.
- Internal CPU registers: IR, PC, MAR, MDR, etc.
- Fundamental sub-operations: memory transfers, register transfers.
- Memory interface.
- Controller organization: hardwired vs. microcode (control store,
uPC, branching, ``subroutines.''). The effect of technology on
organization.
- Pipelining and superscalar operation.
- Harvard architecture and execution stalls.
- External bus organization, memory-mapped I/O, non-memory-mapped I/O.
- Interrupts.
Thomas P. Kelliher
Wed Oct 30 11:53:16 EST 1996
Tom Kelliher