Skip to content

Commit

Permalink
Merge pull request #2469 from dd-baoshan/cv32e40p/dev
Browse files Browse the repository at this point in the history
update prev_is_trap to deassert when exit from exception, irq or debug
  • Loading branch information
pascalgouedo authored Jun 12, 2024
2 parents 010138d + 2547881 commit b928395
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cv32e40p/env/uvme/cov/uvme_rv32x_hwloop_covg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,7 @@ class uvme_rv32x_hwloop_covg # (
function void check_exception_exit();
if (cv32e40p_rvvi_vif.valid && cv32e40p_rvvi_vif.insn == TB_INSTR_MRET && !cv32e40p_rvvi_vif.trap) begin
is_ebreak = 0; is_ecall = 0; is_illegal = 0; is_trap = 0;
prev_is_trap = 0;
`uvm_info(_header, $sformatf("DEBUG - EXCEPTION Exit"), UVM_DEBUG);
end
endfunction : check_exception_exit
Expand Down Expand Up @@ -895,6 +896,7 @@ class uvme_rv32x_hwloop_covg # (
if (is_irq && cv32e40p_rvvi_vif.valid && cv32e40p_rvvi_vif.insn == TB_INSTR_MRET) begin
`uvm_info(_header, $sformatf("DEBUG - IRQ Exit"), UVM_DEBUG);
is_irq = 0;
prev_is_trap = 0;
end
end // IRQ_EXIT
forever begin : INIT_MACHINE_MODE
Expand Down Expand Up @@ -947,6 +949,7 @@ class uvme_rv32x_hwloop_covg # (
@(posedge cv32e40p_rvvi_vif.clk) ; @(negedge cv32e40p_rvvi_vif.clk);
`uvm_info(_header, $sformatf("DEBUG - Debug Mode Exit"), UVM_DEBUG);
is_dbg_mode = 0; is_ebreakm = 0;
prev_is_trap = 0;
end
end // DBG_EXIT

Expand Down

0 comments on commit b928395

Please sign in to comment.