Build a 2-Bit CPU
Objective of this lab:
The purpose of this lab is to learn about CPU Organization
by building a simplified two bit CPU.
Preparation
Read lab lecture notes.
Lab Assignment
- Build a 2-bit CPU by expanding the 1-bit CPU described in the lab notes.
Remember to have a 2-bit bus for your design.
- The 2-bit CPU will do the following operations:
- For instruction 00, do 2-bit XOR, test 10 XOR 11 = 01
- For instruction 01, do 2-bit AND, test 10 AND 11 = 10
- For instruction 10, do bit Addition, use your half adder,
test 1 + 1 = 10, leave the higher bus bit as 0 for the input operands.
- For instruction 11, do bit Subtraction, use your half subtractor and
make the connections do ACC - TEMP, test 0 - 1 = 11, leave the higher bus bit as 0 for the input operands.
Hand in the following:
- The completed 2-bit CPU circuit.
- The micro instructions (steps necessary) to implement the following operations described above.
Remember the pre-conditions.
- Do the XOR operation with the values in register B and C,
and store the result in C.
- Do the AND operation with the values in register B and C,
and store the result in B.
- Do the ADD operation with the values in register ACC and C,
and store the result in B.
For the operands,
use values in the lower bit and
fill the higher bit with 0.
For the result, store the sum bit
in the lower bit and carry bit in the higher bit.
- Do the SUB operation with the values in register B and TEMP,
and store the result in C.
For the operands,
use values in the lower bit and
fill the higher bit with 0.
For the result,
store the difference bit in the lower bit and
the borrow bit in the higher bit.
- Please Note: For all above four operations,
you need to preload values in the registers from the EXTin.
Use the above testing examples for your lab hand-in micro instructions.
Copyright: Department of Computer Science, University of Regina.