32-bit, 5-stage pipelined MIPS processor using DE10-Lite FPGA development board
We follow a standard single-cycle MIPS processor architecture, followed by implementing pipelining with pipelined registers and data hazard solutions including a Forwarding Unit, Stall Control Unit, and Flush Control Unit.
- ADD rd, rs, rt: Reg[rd] = Reg[rs] + Reg[rt].
- BNE rs, rt, imm16: if (Reg[rs] != Reg[rt]) PC = PC + 4 + Sign_ext(Imm16)<<2 else PC = PC + 4.
- J target: PC = { PC[31:28], target, 00 }.
- JR rs: PC = Reg[rs].
- LW rt, imm16(rs): Reg[rt] = Mem[Reg[rs] + Sign_ext(Imm16)].
- SLT rd, rs, rt: If (Reg[rs] < Reg[rt]) Reg[rd] = 00000001 else Reg[rd] = 00000000.
- SUB rd, rs, rt: Reg[rd] = Reg[rs] – Reg[rt].
- SW rt, imm16(rs): Mem[Reg[rs] + Sign_ext(Imm16)] = Reg[rt].
- XORI rt, rs, imm16: Reg[rt] = Reg[rs] XOR Zero_ext(Imm16
Populate the file "instr.txt" with binary instructions (in MIPS), following control signals defined by the Control Unit. Run a simulation on Modelsim to verify processing.