Skip to content

Commit

Permalink
fix exception
Browse files Browse the repository at this point in the history
  • Loading branch information
cyyself committed Jul 19, 2022
1 parent 3ae7053 commit 55d7b56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exception.sv
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ module exception(
always_comb begin: excepttype_define
except_target = 32'hBFC00380;
except_bad_addr = 0;
if(rst || master_pc == 0) begin
if(rst) begin
excepttype = 32'b0;
end else begin
if(((cp0_cause[15:8] & cp0_status[15:8]) != 8'h00) && (cp0_status[1] == 1'b0) && (cp0_status[0] == 1'b1)) begin
if(((cp0_cause[15:8] & cp0_status[15:8]) != 8'h00) && (cp0_status[1] == 1'b0) && (cp0_status[0] == 1'b1) && (|master_pc)) begin
excepttype = 32'h00000001;
end else if(except[1] == 1'b1) begin
// data load出错
Expand Down

0 comments on commit 55d7b56

Please sign in to comment.