image of the mips cpu data path

MIPS 16-bit Processor Architecture

Jan 10, 2023

Summary

Constructed a 16-bit MIPS CPU using VHDL began with individual gates and progressed to more complex components like multiplexers, adders, and registers. Modules such as the ALU, control unit, and sign extender were developed incrementally. Files like ALU_16Bit.vhd, Control.vhd, and MUX31.vhd were added to reflect each module's creation. Testing and debugging were integral, ensuring functionality at every stage. The project culminated in a fully functional CPU using the MIPS ISA.

Github Repo.

This project involved constructing a 16-bit MIPS CPU using VHDL, starting from individual gates and gradually incorporating complex components like multiplexers, adders, and registers. Incremental development of modules such as the ALU, control unit, and sign extender was crucial, supported by rigorous testing and debugging to ensure each component functioned correctly, leading to a fully operational CPU based on the MIPS ISA. he development was documented through various VHDL files, each reflecting the creation and integration of CPU components.

Datapath Schematic and Instruction Format

16-bit Instruction Format
opcode	rd	rs	rt / i
4 bits	4 bits	4 bits	4 bits

Instruction Tests:
Number	Instruction	op	rd	rs	rt / i	output value
1	Addi r3 r0 5	4	3	0	5	5
2	Addi r4 r0 2	4	4	0	2	2
3	Slt r11 r3 r4	7	b	3	4	0	0
4	Sw r3 0(r0)	c	3	0	0	5
5	Sw r4 4(r0)	c	4	4	0	2
6	Addi r6 r0 4	4	6	0	4	4
7	Lw r7 0(r6)	8	7	6	0	2
8	Lw r8 0(r0)	8	8	0	0	5
9	Add r9 r7 r8	0	9	7	8	7
10	Slt r10 r0 r1	7	a	0	1	1
11	Slt r10 r1 r0	7	a	1	0	0
12	Or r5 r10 r9	3	5	a	9	7
13	Subi r10 r5 7	5	a	7	0
14	Sub r11 r10 r7	1	b	a	7	fffe
15	Sw r11 5(r8)	c	b	5	8	fffe

The CPU design was tested with the above instructions, verifying the functionality of arithmetic, logical, and memory operations within the 16-bit MIPS architecture.

Simulations

Simulation of 16-bit MIPS Processor

Simulation of 16-bit MIPS Processor.

Simulation of 16-bit MIPS Processor

Simulation of 16-bit MIPS Processor.

Conclusion

Completing the 16-bit MIPS processor project using VHDL demonstrates comprehensive skills in digital design and problem-solving. The processor, functioning according to the MIPS ISA, showcases the practical application of VHDL in constructing and testing complex hardware systems.