Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functional coverage : Fix illegal cover_group sampling #1825

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading