Skip to content

Commit 55d7b56

Browse files
committed
fix exception
1 parent 3ae7053 commit 55d7b56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exception.sv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ module exception(
2828
always_comb begin: excepttype_define
2929
except_target = 32'hBFC00380;
3030
except_bad_addr = 0;
31-
if(rst || master_pc == 0) begin
31+
if(rst) begin
3232
excepttype = 32'b0;
3333
end else begin
34-
if(((cp0_cause[15:8] & cp0_status[15:8]) != 8'h00) && (cp0_status[1] == 1'b0) && (cp0_status[0] == 1'b1)) begin
34+
if(((cp0_cause[15:8] & cp0_status[15:8]) != 8'h00) && (cp0_status[1] == 1'b0) && (cp0_status[0] == 1'b1) && (|master_pc)) begin
3535
excepttype = 32'h00000001;
3636
end else if(except[1] == 1'b1) begin
3737
// data load出错

0 commit comments

Comments
 (0)