======== START LECTURE #5 ========






This picture shows the setup and hold times discussed above.


Homework: B.18

Registers

A register is basically just an array of D flip-flops. For example a 32-bit register is an array of 32 D flops.


This, however, is not so good! We must have the write line correct quite a while before the active edge. That is you must know whether you are writing quite a while in advance.





An alternative is to use an active low write line, i.e. have a W' input.




To implement a multibit register, just use multiple D flops.

Register File

A register file is just a set of registers, each one numbered.


Reading From a Register File

To support reading a register we just need a (big) mux from the register file to select the correct register.

Writing a Register in a Register File

To support writing a register we use a decoder on the register number to determine which register to write. Note that 3 errors in the book's figure were fixed

Recall that the inputs to a register are W, the write line, D the data to write (if the write line is asserted), and the clock. We should perform a write to register r this cycle if the write line is asserted and the register number specified is r. The idea is to gate the write line with the output of the decoder.

Homework: 20

SRAMS and DRAMS


Note: There are other kinds of flip-flops T, J-K. Also one could learn about excitation tables for each. We will not cover this material (H&P doesn't either). If interested, see Mano