HW 8
HW 8
a) Determine which transistors are involved in a Write operation, and comment on their relative
sizing.
b) For the same cell, determine which transistors are involved in a Read operation, and comment
on their relative sizing.
c) Compare this structure with the 6T SRAM cell. What are the advantages and disadvantages?
EECS 151/251A Homework 8 2
CLK
Q
D
Part a
Part b
If the circuit is a flip flop, is it a positive or negative edge triggered flip flop? If the circuit is a
latch, is it a transparent-high or transparent-low latch?
EECS 151/251A Homework 8 3
How would you modify the circuit to add the following features: an asynchronous reset, a syn-
chronous set and an enable signal? Note that when the enable signal is low, the output of the
register should return its previous state regardless of any clock transitions. Show the modifications
you would make for each feature. Try to minimize the total number of transistors. You may use
any simple 2 input gates and NMOS or PMOS transistors, and you may replace the inverters in
the flip flop circuit, as long as you maintain the desired functionality.
ADD 0
SUB 1
AND 2
OR 3
XOR 4
XNOR 5
SLL 6
SRL 7
SRA 8
SLT 9
SLTU 10
PASSB 11 (pass B to output)
Part a
Write Verilog for the opcode decoder that generates the ALU opcode from the following instruction
opcodes. The input to your module will be the 4-bit instruction opcode and the output will be the
4-bit ALU opcode. Branch instructions (B*) should be ADDs (since you will be adding an offset
to the PC). Jump instructions (JMP) should pass a single input to the output.
EECS 151/251A Homework 8 4
BNE 0
BLT 1
BGT 2
JMP 3
ADD 4
SUB 5
AND 6
OR 7
XOR 8
XNOR 9
SLL 10
SRL 11
SRA 12
SLT 13
SLTU 14
Can you think of a better way to assign ALU opcodes? Explain why or why not, and include
examples.
Part c
Fill in the following resource utilization chart to show how to complete four iterations of the loop
in the minimum number of cycles. Use subscripts (1, 2, 3, and 4) to indicate the iteration number.
For instance, ”C2” indicates node C of iteration 2.
You are building an instruction cache for a MIPS processor. It has a total capacity of 4C = 2c+2 .
0
It is N = 2n -way set-associative (N ≥ 8), with a block size of b = 2b bytes (b ≥ 8). Give your
answers to the following questions in terms of these parameters:
EECS 151/251A Homework 8 6
(a) Which bits of the address are used to select a word within a block?
(b) Which bits of the address are used to select the set within the cache?