Fall 2003, Computer Organization, Assignment 5
Due Friday, December 5 at midnight
There are 40 points on this homework, but it has the same weight as the other
assignments.
Upload the assignment on-line. Do not hand in a printout.
-
(6 points) Assume there is another condition code that tests for signed overflow,
V. It will be set after each ALU operation. If the operation is not F0=F1=1,
then the V bit is cleared. If the operation is F0=F1=1, then the V will be
set if there is signed overflow. Write the Mic-2 instructions that
will implement IFICMP_GTS offset. It will pop the top two values from the
stack and jump if the second value is greater than the first value when treated
as signed numbers. If the V is set, it means that the current value of the
N bit is wrong.
-
(6 points) Use Mic-2 for this one. The instruction ISHR (arithmetic
shift right) exists in JVM but not in IJVM. It uses the top two values on
the stack: it removes the top value and replaces the second value with the
result. The second word on the stack is the operand to be shifted. Its content
is shifted right by a value between 0 and 31 inclusive, depending on the
value in the 5 least significant bits of the top word on the stack
(the other 27 bits of the top word are ignored). The sign bit is
replicated to the right for as many bits as the shift count. Extend the microcode
to include this instruction as part of IJVM. You may not make any assumptions
about what the numeric opcode for the instruction is (Hint: You will need
to generate the number 31). An extra point if it is done in 9 instructions
or less.
-
(4 points) Figure 4-33 on page 258 shows how the SWAP instruction
from Mic-2 would be sequenced in Mic-3. Create a similar table
for ISTORE.
-
(6 points) Create a table similar to the one in Figure 4-44 for the instructions
below.
R3 = R0 + R1
R3 = R3 - R2
R2 = R0 * R1
R0 = R2 + R5
R6 = R3 / R0
R3 = R8 + R9
You do not need to indicate the scoreboard for the registers being read and
written. Use out-of-order issue and out-of-order retire, with register renaming.
Add a column that indicates the type of dependency, if there is one. If there
is more than one, list the one that is more important. Assume that the secret
registers are S0 through S8.
-
No Dependency
-
RAW
-
WAR
-
WAW
-
A computer has a two-level cache. Suppose that 80% of the memory references
hit on the first level cache, 15% hit on the second level, and 5% miss.
The access times are 5 nsec, 20 nsec, and 40 nsec.
-
(2 points) What is the average access time, assuming the times for the level
2 cache and memory start counting at the moment it is known that they are
needed (e.g. a level 2 cache access does not even start until the level 1
cache miss occurs)? Show your work.
-
(2 points) What is the average access time, assuming the time for the level
2 cache starts counting at the moment it is known that it is needed , but
that the memory access starts at the same time as the level 1 cache access
(e.g. a level 2 cache access does not even start until the level 1 cache
miss occurs, but that main memory and the level 1 cache are accessed
simultaneously)? Show your work.
-
(4 points) Consider the direct-mapped cache on page 267 for the address
FEB43265h.
-
What would be the tag and line for this address ? Leave your answers in hex.
Show your work.
-
Suppose the number of bytes in a word were doubled to 8, that there were
twice as many lines in the cache, and that there were 16 words in a
line. What would be the tag and line for this address? Leave your answers
in hex. Show your work.
-
(2) Show how these IJVM instructions would be folded in the picoJava
architecture.
ILOAD 1
ILOAD 2
IADD
ISTORE 3
ILOAD 2
ILOAD 3
IF_ICMPEQ 2345
-
(2) In the description of the SPARC architecture, the book mentions on page
288 that "Instructions are issued in order...". The book contradicts itself
very soon after this statement. Please defend your position of whether or
not the SPARC issues instructions in order or out of order.
-
(3) For topologies b, c, e listed in Fig. 8-4, compute the diameter of the
network.
-
(3) For topologies d, f, g listed in Fig. 8-4, determine the degree of fault
tolerance each one has, defined as the macimum number of links that can be
lost without partitioning the network in two.
Course Objectives met by this Homework
3. Master the design of memory, ALU, control unit, and design of microprogram
4. Be familiar with cache architectures, branch predictions and scheduling of multiple instruction issue
5. Be familiar with instruction set architecture, interrupts, and traps