Skip to content

Commit

Permalink
Fix NonImdempotent and speculation condition on WAIT_OBI (#2482)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanicasa authored Aug 30, 2024
1 parent 2a0e811 commit 505b9b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/frontend/frontend.sv
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ module frontend
obi_vaddr_d = vaddr_d;
data_valid_under_ex = '1;
custom_state_d = WAIT_FLUSH;
end else if (obi_a_ready && spec_req_non_idempot) begin
end else if (obi_a_ready && !spec_req_non_idempot) begin
obi_a_req = '1;
obi_vaddr_d = vaddr_d;
vaddr_d = npc_fetch_address;
Expand Down Expand Up @@ -517,7 +517,7 @@ module frontend
end else begin
custom_state_d = WAIT_NEW_REQ;
end
end else if (obi_a_ready && spec_req_non_idempot) begin
end else if (obi_a_ready && !spec_req_non_idempot) begin
obi_a_req = '1;
obi_vaddr_d = vaddr_d;
vaddr_d = npc_fetch_address;
Expand Down Expand Up @@ -731,7 +731,7 @@ module frontend
logic speculative_q, speculative_d;
assign speculative_d = (speculative_q && !resolved_branch_i.valid || |is_branch || |is_return || |is_jalr) && !flush_i;

assign spec_req_non_idempot = (speculative_d || ((CVA6Cfg.NonIdemPotenceEn && !paddr_nonidempotent) || (!CVA6Cfg.NonIdemPotenceEn)));
assign spec_req_non_idempot = CVA6Cfg.NonIdemPotenceEn ? speculative_d && paddr_nonidempotent : 1'b0;


assign bht_update.valid = resolved_branch_i.valid
Expand Down

0 comments on commit 505b9b7

Please sign in to comment.