Datapath Elements (Cont.)

ALU (Arithmetic and Logic Unit)
It is a combinational element performing arithmetic and logical operations such as addition and AND operations. The ALU takes two 32-bit inputs and produces a 32-bit result, as well as a 1-bit signal if the result is 0. The operation to be performed by the ALU is controlled with the ALU operation signal.

The signals, 4 bits wide, and some of their corresponding functions are shown in the right figure.

Adder
The adder, a combinational element, is an ALU wired to always add its two 32-bit inputs and place the sum on its output. It can not perform the other ALU functions.

Sign Extension
The sign extension unit has a 16-bit input that is sign-extended into a 32-bit result appearing on the output.

Register
The Write Enable (WE) enables or disables writing of register:

  • Negated (0): Data_Out will not change and
  • Asserted (1): Data_Out will become Data_In after clock edge.



      Q: What’s the hottest letter in the alphabet?    
      A: ‘B’, because it makes oil…Boil!