Department of Electrical and Computer Engineering
The University of Texas at Austin
EE 360N, Spring 2001
Yale N. Patt, Instructor
Kameswar Subramaniam, Onur Mutlu, TAs
Exam 1 Solutions

1.

Part a.  Symbol Address A x3003 DONE x3007 ASCII x3008 B x3009

Part b.
The linkage to the main program is lost when JSR B is executed.

Part c.
PC and Z Flag are part of the ISA. MDR and BEN are part of the microarchitecture.

Part d.

• Replacement policy exploits temporal locality.
• A large block size exploits spatial locality.

Part e.
We can use NOT's opcode. Note that if imm5 is x1F, XOR DR, SR1, x1F is the same as NOT DR, SR1.

2. Each tag entry requires 14 bits (1 valid bit, 1 dirty bit, 2 bits for victim/next-victim, 10 bits for tag). We need 2^12 of these entries. The total size of the tag store is ( 2^12 x 14 ) bits. The data store requires 2^19 bits.

3.

Part I.
X[1] = size[1]
X[0] = size[0]
Y[1] = PA[1]
Y[0] = PA[0]
Z = 1st access / 2nd access
Encodings: X[1:0] denotes the size of access. For the truth table in this solution we will assume 00 denotes a byte, 01 denotes a halfword, 10 denotes a word. Y[1:0] correspond to the starting address. Z indicates whether it is the first access or the second. Z=0 indicates "first access", Z=1 indicates "second access".

Part II.

Note that this is only one possible way of forming the truth table.

4.

i. 4 bits
ii. 3 bits
iii. 0101010
iv. 1110000
v.  V PFN 0 1 101 0 0 0 1 010 0 0 0 0 1 011 0 0 1 001 0 0

5.

Part a.

Part b.
We need a 16-bit temporary register which gets its inputs from the system bus. We need a signal LD.T (extra control signal 1) to control when to load this register. This register holds the data that is fetched from memory. We also need a mux in front of the A input of the ALU. This mux should select between SR1 and the output of the temporary register. We need a control signal for the select line of this mux (ALUMX2 - extra control signal 2).
ALUMX2 = 0 selects SR1
ALUMX2 = 1 selects T

Part c.

Unfilled entries are all 0 (You should have explicitly stated this. Or you should have put 0 to the entries that are required to be 0, such as the gating signals).