• A register is a memory element that can hold a multibit datum of bits (such as a byte or a word), and it can be read and written. It can be implemented using D flip-flops, each storing one bit.
  • A register file consists of a set of registers that can be read and written by supplying a register number to be accessed. it can be implemented with a decoder for each read and write port, and an array of registers
  • In MIPS, a register file has registers, each storing a -bit value, that is bits in total implemented D flip-flops where all connected to the same clock signal.
  • In MIPS, we define a special register called zero that always contains the value zero, and it cannot be written to. (we do not present its implementation here)

Register Read

  • read port: the read register number input connected as the selector of -to-1 multiplexor with registers as data inputs of the multiplexor that outputs the read data
  • for registers of bits, a -bit Read Register Number input is used as the selector for -to-1 multiplexor that outputs -bit Read Data

Register File (read)

  • In MIPS, Two 5-bit lines (read register 1 and read register 2) specify which registers to read (values between 0 and 31), using two 32-to-1 multiplexors.
  • If read register 1 and read register 2 are the same, both outputs will contain the same value.

Register Write

  • write port
  • A Clock signal is connected to the clock input of all flip-flops
    • TODO: does not appear in this diagram, but it is connected to the clock input of all flip-flops instead of the AND output, which will be connected to E in the actual implementation.
  • A Write Enable signal (will be called later RegWrite)
  • A Register Number input ( bits) is implemented using a using a -to- decoder (5-to-32) that each one of its outputs is connected with the Write Enable signal using an AND gate to the clock input of the corresponding register flip-flop.
  • A Register Data input (32 bits) is connected to the data input of the corresponding register flip-flop.

Register File (write)