CS 2733/2731
Computer Organization II -- Fall 2002
Review for Final Exam
(Tuesday, 10 December 2002,
1:30-4:15 pm)
Previous Reviews:
Refer to the reviews for Exam 1 and Exam 2 for material covered
up to the second exam:
See
Review for Exam 1 and
Review for Exam 2
Previous Exams: Previous exams are available through the individual
web pages. This final may be significantly different from previous ones.
In particular, last semester I covered topics from caches (Chapter)
and from buses (Section 8.4), but I did not cover these topics
this semester, so there will be no final exam questions on these topics.
Review topics: Here are the new topics since the second exam,
mainly just Chapter 6 on the pipelined implementation.
Note that the final will emphasize Chapter 6, since.)
- Exceptions and the trap handler in MIPS (Lab 10).
- The specifics of how the trap handler works.
- Take-home quiz on exceptions:
quiz
- Pipelined Implementation (Chapter 6)
- Overview (Section 6.1, includes especially discussion of
hazards).
- Pipelined datapath (Section 6.2, ignores hazards).
Note the several ways of graphically representing pipelines
on pages 461-465, especially the series of diagrams
in Figures 6.22-6.24.
- Pipelined control (Section 6.3, ignores hazards).
The control signals from the Control unit are the same as
for the single-cycle implementation, but the pipelined implementation
makes use of extra latched
register storage between pipeline stages to pass along control
information. (See Figures 6.29 and 6.30. See also the
good series of diagrams in Figures 6.31-6.35.)
- Data hazards and forwarding (Section 6.4).
You should understand how forwarding works, with the Forwarding Unit
and extra control and data lines.
This applies to dependencies between the register result of one
instruction and the use of that new register value in subsequent
instructions. (See especially Figure 6.38 and the
series of diagrams in Figures 6.41-6.42. We did not cover
Figure 6.43 or page 488.)
- Data hazards and stalls (Section 6.5).
In case of a dependency involving a lw instruction,
the machine must stall for one instruction. This uses the
Hazard Detection Unit.
Note how the stall is inserted by
de-asserting write lines to the PC and the IF/ID registers,
and by inserting all zeros on control lines. (These zeros
propagate along from cycle to cycle, as the "bubble" of
a stalled instruction moves along the pipeline.)
See diagrams in Figures 6.47-6.49. Note that the
final forwarding is done by the Forwarding Unit as before.
- Branch hazard (Section 6.6). In case of a branch,
if the branch is taken (in one simple implementation),
must stall and wipe out the start of the next instruction.
(Also need to move branch handling into step 2 of pipeline.)
See Figures 6.51 and 6.52. Skip Section 6.6 from pape 501 on.
- Exceptions (Section 6.7). Example of arithmetic overflow.
IF.Flush, ID.Flush, EX.Flush lines to put nop
in first stage and to set control lines to zeros in second
and third stages.
Likely final exam questions:
- No questions about the use of CMOS transistors to create
gates.
- Probably several questions about MIPS assembly and machine
language. I might ask for the code for a simple loop
(use of beq or bne), or
for a simple call to a function (jal)
and the code for the function (jr $ra to return), or
access to memory (use of lw or sw).
- Possibly one question about the correspondence between
machine code and assembler code (as in Lab 8:
Hand Assembly of MIPS Code.
- At least one question on either the single-cycle or
multi-cycle implementation. This might even ask you to do
something creative, such a implementing a new instruction.
The text has exercises asking how to implement the
addi instruction in both the single-cycle
and the multi-cycle models, without additional control lines.
(Instruction decode does have to recognize the new instruction.)
- Extra emphasis on the pipelining chapter, the first seven
sections.
- I might ask about the pipelined datapath or pipelined
control (lots of figures in sections 6.2, 6.3).
- I plan to give you a diagram with a forwarding unit,
for you to explain how the forwarding unit works in simple
cases not involving a stall (section 6.4, figures 6.41, 6.42).
- I might ask about the hazard detection unit and stall used
to handle the lw instruction (section 6.5,
figures 6.47, 6.48, 6.49).
- I might ask about handling the beq instruction
by moving everything into step 2, and by putting in a 1-cycle
stall bubble (for successful branch) (section 6.6,
figures 6.51, 6.52).
- I might ask about handling arithmetic overflow exception
by flushing the pipeline and restarting the instruction at address
40000040 (section 6.7, figures 6.55, 6.56).
- Probably one question about exception handlers.
- Perhaps one question about coding theory, probably the
Hamming code.
Good Luck!!!
Revision date: 2002-12-02.
(Please use ISO
8601, the International Standard.)