Below is the Datapath that we will use. We will start with understanding how we can configure the Control signals based on any given instruction.
| Operations | ALUControl value | Description && Notes |
|---|---|---|
| ADDITION | 0000 | ALUResult = A + B |
| SUBRACTION | 0001 | ALUResult = A - B |
| MULTIPLICATION | 0010 | ALUResult = A * B |
| AND | 0011 | A and B |
| OR | 0100 | A or B |
| SET LESS THAN | 0101 | ALUResult =(A < B)? 1:0 |
| SET EQUAL | 0110 | ALUResult =(A=B) ? 1:0 |
| SET NOT EQUAL | 0111 | ALUResult =(A!=B) ? 1:0 |
| LEFT SHIFT | 1000 | ALUResult = A << B |
| RIGHT SHIFT | 1001 | ALUResult = A >> B |
| ROTATE RIGHT | 1010 | ALUResult = A ROTR B |

