Assignment 12, due May 5
On every assignment, write your name legibly as it appears on your University ID card! Homework is due on paper at the start of class on the day indicated (usually Friday). Exceptions will be made only by advance arrangement (excepting "acts of God"). Late work must be turned in to the TA's mailbox (ask the CS receptionist in 14 MLH for help). Never push homework under someone's door!
A problem: Assume you are working on an undefined instruction trap handler. Your job is to make the instruction trap handler redefine all undefined instructions as being equivalent to a halfword no-op instruction. That is, whenever the CPU encounteres an undefined instruction, the trap handler should increment the PC by 2 and return from trap making no other changes to the registers. Your answer should be the complete code of myCODE for this trap handler.
Hint: It is not big code, perhaps 6 instructions, including subroutine entry and return. (1.5 points).
Your machine has a cache with a capacity of 10,000 bytes where the cache allows memory operations in 1 ns. Main memory is much much larger, and has an access time of 20 ns. Assume that the program is small, so you can ignore the size of the program itself, paying attention only to the data.
A problem: Sketch a graph of t as a function of n. Theory predicts a straight line (and we didn't give you enough information for you to give the slope of the line. In practice, the line is not straight, and there is a kink in the line. On your graph, indicate the correct value of n where the line kinks, make the line kink in the correct direction, and give the ratio of the slopes above and below the kink. (0.5 points).
A question: Aren't memory addresses 32 bits on the Hawk? Why did it say 30 bits here? (0.5 points).
The marketplace these days demands that large machines support RAM sizes bigger than 4 gigabytes. A larger physical address could be supported by dedicating unused bits in the MMUDATA register to the physical page number.
A question: How many bits are there in the largest physical (word) address that could be supported on a modified version of the Hawk without major changes to the way the MMU interface operates? (0.5 points).