mirror of
https://github.com/supleed2/ELEC50010-IAC-CW.git
synced 2024-12-22 21:35:48 +00:00
Add initial value to npc, add JR to CtrlMemRead
This commit is contained in:
parent
1ae5d78b4d
commit
2be1978a36
|
@ -124,6 +124,8 @@ always @(*) begin
|
||||||
CtrlMemtoReg = 3'd3;//write data port of regfile is fed from ALUHi
|
CtrlMemtoReg = 3'd3;//write data port of regfile is fed from ALUHi
|
||||||
end else if ((op==SPECIAL)&&(funct == MFLO))begin
|
end else if ((op==SPECIAL)&&(funct == MFLO))begin
|
||||||
CtrlMemtoReg = 3'd4;//write data port of regfile is fed from ALULo
|
CtrlMemtoReg = 3'd4;//write data port of regfile is fed from ALULo
|
||||||
|
end else if ((op==SPECIAL)&&(funct == JR))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
|
end else begin CtrlMemRead = 1'bx;end//Not all instructions are encompassed so, added incase for debug purposes
|
||||||
$display("OP: %d, Funct: %d", op, funct);
|
$display("OP: %d, Funct: %d", op, funct);
|
||||||
//CtrlALUOp Logic
|
//CtrlALUOp Logic
|
||||||
|
|
|
@ -9,6 +9,7 @@ reg[31:0] npc_curr;
|
||||||
|
|
||||||
initial begin
|
initial begin
|
||||||
npc_curr = (32'hBFC00000 + 32'd4);
|
npc_curr = (32'hBFC00000 + 32'd4);
|
||||||
|
npc_out = 32'hBFC00000;
|
||||||
end // initial
|
end // initial
|
||||||
|
|
||||||
always_comb begin
|
always_comb begin
|
||||||
|
|
0
test/test_mips_cpu_custom_bus.sh
Normal file → Executable file
0
test/test_mips_cpu_custom_bus.sh
Normal file → Executable file
Loading…
Reference in a new issue