You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
!pending_irq &&!is_dbg_mode &&!is_irq) begin// set excep flag only if no pending irq, not in irq and not in dbg mode
827
+
elseif ((cv32e40p_rvvi_vif.csr_dcsr_step ||!pending_irq_ack) &&!is_dbg_mode &&!is_irq) begin// set excep flag only if no pending irq is serving, not in irq and not in dbg mode
830
828
is_trap =1;
831
829
case (cv32e40p_rvvi_vif.insn)
832
830
TB_INSTR_EBREAK, INSTR_CBREAK:if (cv32e40p_rvvi_vif.csr_dcsr_ebreakm) begin
@@ -845,11 +843,24 @@ class uvme_rv32x_hwloop_covg # (
845
843
end// bypass if pending irq exist
846
844
end// EXCEPTION_HANDLING
847
845
848
-
foreverbegin
846
+
foreverbegin:UPDATE_PREV_IRQ_ONEHOT_PRIORITY_IS_0
849
847
@(posedge cv32e40p_rvvi_vif.clk);
850
848
if (prev_irq_onehot_priority ==0) prev_irq_onehot_priority_is_0 =1;
851
849
else prev_irq_onehot_priority_is_0 =0;
852
850
end
851
+
foreverbegin:SET_PENDING_IRQ_ACK
852
+
@(cv32e40p_rvvi_vif.valid_irq);
853
+
if (cv32e40p_rvvi_vif.valid_irq < valid_irq_prev) begin
854
+
pending_irq_ack =1;
855
+
end
856
+
valid_irq_prev = cv32e40p_rvvi_vif.valid_irq;
857
+
end
858
+
foreverbegin:RESET_PENDING_IRQ_ACK
859
+
@(posedge cv32e40p_rvvi_vif.clk);
860
+
if (cv32e40p_rvvi_vif.valid) begin
861
+
if (pc_is_mtvec_addr() &&is_mcause_irq()) pending_irq_ack =0;
862
+
end
863
+
end
853
864
foreverbegin:SET_PENDING_IRQ_FLAG
854
865
@(negedge cv32e40p_rvvi_vif.clk);
855
866
if (cv32e40p_rvvi_vif.irq_onehot_priority !== prev_irq_onehot_priority) begin
@@ -959,8 +970,8 @@ class uvme_rv32x_hwloop_covg # (
if (hwloop_stat_main.execute_instr_in_hwloop[0] | hwloop_stat_main.execute_instr_in_hwloop[1]) begin
961
972
if (is_trap && enter_hwloop_sub_cnt ==1) begin:TRAP_DUETO_IRQ_ENTRY// exception trap and irq are b2b cycles
962
-
if (hwloop_stat_main.execute_instr_in_hwloop[0] && lpend_has_pending_irq_main[0]) begin hwloop_stat_main.track_lp_cnt[0]++; lpend_has_pending_irq_main[0] =0; end
963
-
if (hwloop_stat_main.execute_instr_in_hwloop[1] && lpend_has_pending_irq_main[1]) begin hwloop_stat_main.track_lp_cnt[1]++; lpend_has_pending_irq_main[1] =0; end
973
+
if (hwloop_stat_main.execute_instr_in_hwloop[0] && lpend_has_pending_irq_main[0]) begin hwloop_stat_main.track_lp_cnt[0]++; lpend_has_pending_irq_main[0] =0; end// revert lp_cnt
974
+
if (hwloop_stat_main.execute_instr_in_hwloop[1] && lpend_has_pending_irq_main[1]) begin hwloop_stat_main.track_lp_cnt[1]++; lpend_has_pending_irq_main[1] =0; end// revert lp_cnt
964
975
has_pending_trap_due2_irq =1; is_trap =0;
965
976
enter_hwloop_sub =0; enter_hwloop_sub_cnt =0;
966
977
pending_irq =0;
@@ -992,8 +1003,8 @@ class uvme_rv32x_hwloop_covg # (
0 commit comments