Skip to content

Commit

Permalink
Functional coverage : Fix illegal cover_group sampling (#1825)
Browse files Browse the repository at this point in the history
  • Loading branch information
AyoubJalali authored Feb 12, 2024
1 parent 0f2b137 commit 3599839
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions verif/env/uvme/cov/uvme_illegal_instr_covg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -189,21 +189,21 @@ task uvme_illegal_instr_cov_model_c::sample_isa (uvma_isacov_instr_c instr);

logic is_illegal_instr = (instr.cause == 2);

if (!have_sampled && is_illegal_instr && cfg.ext_i_supported) begin
have_sampled = 1;
if (is_illegal_instr && cfg.ext_i_supported) begin
illegal_i_cg.sample(instr);
end
if (!have_sampled && is_illegal_instr && cfg.ext_m_supported) begin
have_sampled = 1;
illegal_m_cg.sample(instr);
end
if (!have_sampled && is_illegal_instr && cfg.ext_zicsr_supported) begin
if (is_illegal_instr && cfg.ext_m_supported) begin
illegal_m_cg.sample(instr);
have_sampled = 1;
illegal_zicsr_cg.sample(instr);
end
if (!have_sampled && is_illegal_instr && cfg.ext_zifencei_supported) begin
if (is_illegal_instr && cfg.ext_zicsr_supported) begin
illegal_zicsr_cg.sample(instr);
have_sampled = 1;
end
if (is_illegal_instr && cfg.ext_zifencei_supported) begin
illegal_zifencei_cg.sample(instr);
have_sampled = 1;
end
if (!have_sampled && is_illegal_instr) begin
`uvm_error("ILLEGAL_INSTR", $sformatf("Could not sample instruction: %h", instr.rvfi.insn));
Expand Down

0 comments on commit 3599839

Please sign in to comment.