This is an 8-bit microprocessor that is designed to implement a set of 16 instructions as per the project specifications.
The whole microprocessor design is divided into 5 parts:
- Instruction Memory
- Control Unit(CU)
- Data Memory
- Arithmetic Logic Unit(ALU)
- Multiplexers(MUX)
- User writes the instructions to the instruction memory which will be fetched by the Control unit later on.
- User provides input to Data memory which is required for performing the operation after the control unit decodes the instruction.
- Control unit fetches instructions one-by-one and decodes them to perform operations.
- Now, the Control unit performs operations on the data present in the data memory with the help of ALU.
- Once the operation is finished in the ALU, then the required result will be obtained as the output.
- As mentioned in the question, a sign extension is used for handling the inputs.
- Because the provided input is of either 2 bits or 4 bits but we need an 8-bit input based on the register size. So, we used a 6-bit sign extension in the case of 2-bit input and a 4-bit sign extension in the case of 4-bit input.
- Eg: 01 input is taken as 00000001 and 1001 input is taken as 11111001.
This is a state diagram that shows the process of obtaining output based on the given input.

This is about the 8-bit microprocessor which was designed from scratch using Verilog focusing on architecture. Proper testing and debugging were done by using the provided set of input instructions.

