CPE 315
Winter 2008
Exam #2 Announcement and Notes
Sample Exam with Solutions
This was a 50 minute exam; you will take a 80 minute exam
Ignore Problem #6 - we haven't covered Chapter 4.
Your exam has problems similar to #2, #3, #4, #5, #7
Your exam will have more emphasis on Kidder's book, including
technical questions.
Your exam includes microcode, exceptions and Fig. 5.39
Exam #2 will be held on Mar. 4 during lecture time.
Note:
- The midterm will cover the textbook readings
from (Appendix B, Chapts 1,2,3,5), Soul of a New Machine,
the course lectures and the learning objectives from the labs.
The exam emphasizes Chapter 5 and the mips lab projects.
There will be no questions on the lab tools (SPIM and SIM) but you
are responsible for the concepts learned in the lab.
- The exam is closed book
You may bring one 8 1/2 x 11 sheet of paper (both sides) with notes in your own handwriting or copied from class handouts.
- Calculators may not be used.
- You must use 5 colored pens for some of the questions.
- You will be provided the following figures from the textbook as appropriate to the exam questions.
Figures B.5.10, B.5.12, B.9.3, 5.24, 5.30, 5.39 and the
official MIPS instruction sheet
- You may not use pseudo instructions to answer any question on the exam.
- Improperly commented code will receive a grade of 0.
- Avoid the use of
bad words in answers. A bad word connotes a lack of
understanding.
To prepare for the examination be sure you are able to:
- Do any of the homework problems or problems similar to the homework problems.
- Write the truth table and implement a sum-of-products circuit for a
simple problem.
- Write a MIPS assembly language program.
Be sure you understand how to deal with 32 bit addresses
You will not be allowed to use any pseudo instructions; be sure you know how to load the two parts of an (unknown) MIPS address into a register.
- Perform addressing mode calculations using the MIPS addressing modes.
for example:
- Calculate address for lw/sw instruction
- Calculate new PC for beq/j/jr/jal instruction
- Given PC and new PC, compute machine code for beq/j/jal instruction
- Calculate result for I type instructions
- Do signed/unsigned add and subtract using 2's complement operands.
Ensure you are able to calculate and interpret the overflow and carry bits correctly.
Ensure you understand the SLT instruction in all its forms and how MIPS handles the SLT instruction correctly.
- Convert float to decimal and decimal to float.
- Do multiply using Booth's algorithm.
You may use the
conceptual version of the algorithm as covered in lecture
OR the formal algorithm covered in the text.
- Answer questions about the MIPS hardware design.
Be able to show bus contents and usage on figures 5.24 and 5.39
Show the changes necessary to add a new instruction to Figure 5.24. (
you won't be asked to add an instruction to Fig. 5.39)
- Answer questions about the MIPS ALU.
- Answer short essay questions on some of the important concepts covered in CPE 315. A partial list of typical questions:
- Why is 2's complement arithmetic used in adders?
- What's wrong with a single-clock implementation of a CPU?
- What are the advantages of a RISC computer such as MIPS?
- What are the significant features of a RISC computer such as MIPS?
- Why do microprogrammers use a simulator rather than an actual computer?
- Explain and discuss any of the Fallacies and Pitfalls in the readings.
- Calculate and use
computer architecture units
correctly.
What you won't have to do on the examination:
- Write MIPS microcode.
- Answer specific questions about SIM.
- Write SIM code.
- Answer questions about SPIM operation.
And most importantly, be sure to practice showing your work in
a clear, precise manner. Credit will only be given for answers presented
in this way.
Last updated on 2/20/08