From ad394c7d7d7bc67b66322895571a8934db12b6cd Mon Sep 17 00:00:00 2001 From: Aadi Desai <21363892+supleed2@users.noreply.github.com> Date: Thu, 17 Dec 2020 09:02:58 -0800 Subject: [PATCH] Adding missing opcodes to CtrlMemRead --- rtl/mips_cpu_control.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtl/mips_cpu_control.v b/rtl/mips_cpu_control.v index 2bab8f5..86ec213 100644 --- a/rtl/mips_cpu_control.v +++ b/rtl/mips_cpu_control.v @@ -117,7 +117,7 @@ always @(*) begin CtrlMemtoReg = 3'd3;//write data port of regfile is fed from ALUHi end else if ((op==SPECIAL)&&(funct == MFLO))begin CtrlMemtoReg = 3'd4;//write data port of regfile is fed from ALULo - end else if ((op==SPECIAL)&&(funct == JR))begin + end else if (((op==SPECIAL)&&(funct == JR)) || (op == BEQ) || ((op==REGIMM)&&(rt==BGEZ)) || (op==BGTZ) || ((op==REGIMM)&&(rt==BLTZ)) || (op==BLEZ) || (op==BNE) || (op==J))begin CtrlMemRead = 0;//Read disabled during jump end else begin CtrlMemRead = 1'bx;end//Not all instructions are encompassed so, added incase for debug purposes