Components of the Datapath


The datapath is the component of the processor that performs arithmetic operations. The datapath elements in the MIPS implementation consist of two different types of logic elements: combinational elements and state elements.

Combinational Elements
They are the elements that operate on data values. The outputs of the combinational elements depend only on the current inputs. Given the same input, a combinational element always produces the same output because it has no internal storage.

For example, ALU, adder, immediate extender, and multiplexors are all combinational elements.

State Elements
They are the elements contain state because they have some internal storage.

A state element has at least two inputs and one output. The required inputs are the data value to be written into the element and the clock, which determines when the data value is written. The output from a state element provides the value that was written in an earlier clock cycle. Instruction memory, data memory, PC register, and register file are all state elements.

Logic components that contain state are also called sequential, because their outputs depend on both their inputs and the contents of the internal state. For example, the output from the registers depends both on the register numbers supplied and on what was written into the registers previously.