Fix sltiu in control, sb/sh instr and add jr 31 instr

This commit is contained in:
jl7719 2020-12-20 14:32:49 +00:00
parent 62c7ffc32b
commit 9003384106
8 changed files with 11 additions and 6 deletions

View file

@ -0,0 +1,4 @@
25080000
03e00008
25080000
00000000

View file

@ -0,0 +1 @@
0

View file

@ -1,5 +1,5 @@
3C041234 3C041234
34045678 34845678
3405101C 3405101C
A0A40000 A0A40000
80A20000 80A20000

View file

@ -1,5 +1,5 @@
3C041234 3C041234
34045678 34845678
3405101C 3405101C
A0A40000 A0A40000
8CA20000 8CA20000

View file

@ -1,5 +1,5 @@
3C041234 3C041234
34045678 34845678
3405101C 3405101C
A4A40000 A4A40000
84A20000 84A20000

View file

@ -1,5 +1,5 @@
3C041234 3C041234
34045678 34845678
3405101C 3405101C
A4A40000 A4A40000
8CA20000 8CA20000

View file

@ -1 +1 @@
0 1

View file

@ -207,7 +207,7 @@ always @(*) begin
end else begin CtrlALUSrc = 1'bx;end end else begin CtrlALUSrc = 1'bx;end
//CtrlRegWrite logic //CtrlRegWrite logic
if((op==ADDIU) || (op==ANDI) || (op==LB) || (op==LBU) || (op==LH) || (op==LHU) || (op==LUI) || (op==LW) || (op==LWL) || (op==LWR) || (op==ORI) || (op==JAL) || (op==SLTI) || (op==XORI) || ((op==REGIMM)&&((rt==BGEZAL) || (rt==BLTZAL))) || ((op==SPECIAL)&&((funct==ADDU) || (funct==AND) || (funct==MFLO) || (funct==MFHI) || (funct==OR) || (funct==SLL) || (funct==SLLV) || (funct==SLT) || (funct==SLTU) || (funct==SRA) || (funct==SRAV) || (funct==SRL) || (funct==SRLV) || (funct==SUBU) || (funct==JALR) || (funct==XOR)))) begin if((op==ADDIU) || (op==ANDI) || (op==LB) || (op==LBU) || (op==LH) || (op==LHU) || (op==LUI) || (op==LW) || (op==LWL) || (op==LWR) || (op==ORI) || (op==JAL) || (op==SLTIU) || (op==SLTI) || (op==XORI) || ((op==REGIMM)&&((rt==BGEZAL) || (rt==BLTZAL))) || ((op==SPECIAL)&&((funct==ADDU) || (funct==AND) || (funct==MFLO) || (funct==MFHI) || (funct==OR) || (funct==SLL) || (funct==SLLV) || (funct==SLT) || (funct==SLTU) || (funct==SRA) || (funct==SRAV) || (funct==SRL) || (funct==SRLV) || (funct==SUBU) || (funct==JALR) || (funct==XOR)))) begin
CtrlRegWrite = 1;//The Registers are Write Enabled CtrlRegWrite = 1;//The Registers are Write Enabled
end else begin CtrlRegWrite = 0;end // The Registers are Write Disabled end else begin CtrlRegWrite = 0;end // The Registers are Write Disabled
end end