UP ONE LEVEL:
ENCM 369 Winter 2003 Home Page
ENCM 369 Winter 2003 Final Exam Information
Author: Steve Norman
Last modified: Mon Apr 14 14:14:34 MDT 2003
Contents
Exam Time and Location
The exam takes place in the Red Gym from noon to 3:00pm.
on Monday, April 21.
[back to top of document]
Closed-book, no calculators
The exam is closed-book--do not not take any books or notes
to your seat.
Use of calculators or computers during the exam is
not permitted.
[back to top of document]
Exam Topics
First, a general principle:
The exam will focus mainly on topics that were
heavily emphasized in lectures and labs.
We are not going to make a lot of marks depend on
topics that were given very little coverage in lectures and labs.
The exam will cover all material up to and including Lab 11 and
the lectures of Monday, April 14, with the following exceptions:
- You will not have to answer questions about how
to use xspim.
- You will not have to determine bit patterns for
instructions, or determine what instructions correspond
to a given bit patterns.
However, you should know the formats of the instructions
supported by the processors of Chapter 5 of the text.
- You do not need to know gcc options to
do such things as run
only the compiler, or run only the assembler.
However, you should know the role of each
tool--preprocessor, compiler, assembler, linker--in
the process of building executables on Unix-like systems.
The examination is on the entire course.
There will be an emphasis on post-midterm material,
but there will also be a significant number of problems
concentrating on pre-midterm material.
There may be a small number of marks associated
with material in the assigned reading
that was not covered in lectures.
Let me repeat that the number of marks related to this
material will be either zero or very small.
[back to top of document]
Exam Format
The exam will consist of many short questions.
Questions will be of the following types:
- You will have to write SPIM procedures or other short sequences
of SPIM instructions.
You may be asked to translate C functions.
You may also be asked to write code to perform a
specified task without having any C code to work from.
When writing code, you must use only the instructions
and pseudoinstructions listed in the
section below called ``Final Exam Instruction Subset''.
- You will have to draw diagrams and/or
predict register and memory contents to show that you know how a
given SPIM program works.
- You will have to write some short paragraphs
(roughly two or three sentences) to show that you
understand key terms and concepts from the course.
- You will have to solve problems related to the single-cycle
and multi-cycle processor designs of Chapter 5 of the
textbook.
- You will have to solve one or more problems related to
caches and virtual memory.
You will write all of your answers on the question paper,
in spaces provided for answers.
[back to top of document]
Final Exam Instruction Subset
In order to avoid having you spend a lot of time
memorizing all of the instructions you have seen
so far in the course, all problems
that ask you to read or write SPIM code will be set up
so that you can solve them with knowledge of
a subset of MIPS instructions.
This subset consists of two parts:
the ``Midterm Instruction Subset'',
and a group of additional instructions added for the final
exam.
The ``Midterm Instruction Subset'' is:
add, addi, addu, addiu,
sub, subu,
and, andi,
or, ori,
sll, srl,
lui,
lw, sw, lb, lbu, sb,
beq, bne,
j, jal, jr,
slt, slti, sltu, sltiu,
mult, multu, mfhi, mflo
la, li
The additional instructions and pseudoinstructions
added for the final exam are:
div, divu,
add.s, add.d, sub.s, sub.d,
mul.s, mul.d, div.s, div.d,
mtc1, mfc1,
mov.s, mov.d,
l.s, l.d, s.s, s.d,
c.x.s, c.x.d (where x is one of eq, lt, le),
bc1t, bc1f
Reference Material
You will be provided with a few pages of reference material
along with the question paper.
This material will include:
- A list of all 32 general purpose registers in a MIPS processor.
- A brief description of the floating-point registers.
- Documentation for all of the instructions in the ``Final Exam
Instruction Subset'' listed above.
Here are some examples of the documentation:
- addu rdest, rsrc1, rsrc2
Add words from registers rsrc1 and rsrc2
and put result in register rdest.
- lb rdest, address
Copy byte at memory address address to bits 7-0
of register rdest, and make bits 31-8 of
rdest equal to bit 7 of that byte.
- Some diagrams copied from Chapter 5 of the textbook.
[back to top of document]
Suggestions for preparation
Here are suggestions for review:
- Start preparing as soon as possible.
It's much better to find gaps in your knowledge two weeks
before the final than to find them the night before.
- Re-read the assigned sections from the textbook.
Pay particularly close attention to material that
got heavy coverage in lectures and/or labs.
- Review lecture notes and lab handouts carefully.
Many of the `Read This First' sections in lab handouts
contain useful information.
- Try to do all of the problems from the old exams.
- Check the posted solutions to lab problems.
Do this even for problems for which you got full
marks--your TA may have overlooked a mistake,
or the solutions may show approaches that are
simpler than yours.
- Re-do lab exercises using pencil and paper,
especially those exercises that you found difficult
when you first did them.
Practice writing complete procedure definitions with
pencil and paper--writing code by hand is a bit different
from typing code in a text editor, and it's obviously
an important skill to develop for tests and exams.
- Review the tutorial exercises.
[back to top of document]