Lab 10: Register Files


Due Tuesday, December 5 at 9:29 AM

Goals for This Lab

By the time you have completed this work, you should be able to:

There is only a single (but large!) task for this lab: to design a register file. The register file is a processor component which contains programmer-accessible registers. To this end, the register file has the following sorts of inputs:

Given the above inputs, the register file will potentially write to a register, and then output the value in the specified register.

Specifically for this task, you will design a register file which holds two registers named reg0 and reg1. Each one of these registers is two bits large. For comparison, the register file in ARM holds 16 registers, and each is 32 bits large. This register file takes the following inputs:

Input Name Input Description
R Specifies which register to read from or write to. If 0, then reg0 should be used. If 1, then reg1 should be used.
WE Short for “Write Enable”. If 1, then we will write to a register. If 0, then we will not write to a register.
I0 Bit 0 of a two-bit value to write to the register specified by R. If WE = 0, this is effectively ignored.
I1 Bit 1 of a two-bit value to write to the register specified by R. If WE = 0, this is effectively ignored.
CLK Input from the clock.

The register file returns the following two outputs:

Output Name Output Description
U0 Bit 0 of the register which was read. This output will be ignored if WE = 1.
U1 Bit 1 of the register which was read. This output will be ignored if WE = 1.

To complete this task, you may use only the following components, in unlimited supply:

Implementation Hints

Submission Instructions

You may either submit your picture / scan on Canvas (for Lab 10), or submit it directly to me in class on Thursday, November 30. If you submit it online, name it register_file.jpg, being sure that it's a jpeg image. If you collaborated with anyone, write it in the margins of the image.