Skip to content

Commit

Permalink
commit_stage.sv: add condition before Zcmp code (#1932)
Browse files Browse the repository at this point in the history
  • Loading branch information
ASintzoff committed Mar 15, 2024
1 parent 9a713c3 commit f0887e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/commit_stage.sv
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ module commit_stage
// we will not commit the instruction if we took an exception
// and we do not commit the instruction if we requested a halt
if (commit_instr_i[0].valid && !commit_instr_i[0].ex.valid && !halt_i) begin
if (commit_instr_i[0].is_macro_instr && commit_instr_i[0].is_last_macro_instr)
if (CVA6Cfg.RVZCMP && commit_instr_i[0].is_macro_instr && commit_instr_i[0].is_last_macro_instr)
commit_macro_ack[0] = 1'b1;
else commit_macro_ack[0] = 1'b0;
// we can definitely write the register file
Expand Down Expand Up @@ -292,7 +292,9 @@ module commit_stage
end
end
end
commit_macro_ack_o = (commit_instr_i[0].is_macro_instr || commit_instr_i[1].is_macro_instr) ? commit_macro_ack : commit_ack_o;
if (CVA6Cfg.RVZCMP)
commit_macro_ack_o = (commit_instr_i[0].is_macro_instr || commit_instr_i[1].is_macro_instr) ? commit_macro_ack : commit_ack_o;
else commit_macro_ack_o = commit_ack_o;
end

// -----------------------------
Expand Down

0 comments on commit f0887e4

Please sign in to comment.