mirror of
https://github.com/supleed2/ELEC50010-IAC-CW.git
synced 2024-11-10 01:35:49 +00:00
Added ALUZero Output + corrected other syntax errors
This commit is contained in:
parent
89abb5c1ed
commit
c4cae70ffc
|
@ -13,7 +13,7 @@ module mips_cpu_alu(
|
|||
|
||||
reg [31:0] SignExtend, ZeroExtend;
|
||||
|
||||
input logic[10:6] shamt = instr_readdata[10:6];
|
||||
input logic[10:6] shamt = instr_readdata[10:6]
|
||||
|
||||
);
|
||||
|
||||
|
@ -78,7 +78,7 @@ module mips_cpu_alu(
|
|||
|
||||
} ALUFlags;
|
||||
|
||||
always @(alu_in1, alu_in2, ALUFlags)
|
||||
always @(A,B, ALUFlags)
|
||||
begin
|
||||
|
||||
SignExtend = {{16{immediate[15]}}, immediate};
|
||||
|
@ -235,6 +235,18 @@ module mips_cpu_alu(
|
|||
end
|
||||
|
||||
|
||||
endcase
|
||||
end
|
||||
|
||||
always @(ALUOut) begin
|
||||
if (ALUOut == 0) begin
|
||||
ALUZero <= 1;
|
||||
end else begin
|
||||
ALUZero <= 0;
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
endmodule
|
Loading…
Reference in a new issue