From ec096aafd3407ef2930fe9ba8344f4695bec723d Mon Sep 17 00:00:00 2001 From: christian-herber-nxp <101172126+christian-herber-nxp@users.noreply.github.com> Date: Fri, 3 Mar 2023 17:06:49 +0100 Subject: [PATCH] [rtl] Don't take interrupts when single stepping (#97) Fixes #1814 Co-authored-by: Greg Chadwick --- rtl/cve2_controller.sv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtl/cve2_controller.sv b/rtl/cve2_controller.sv index 6e4ddb16d0..79008223ac 100644 --- a/rtl/cve2_controller.sv +++ b/rtl/cve2_controller.sv @@ -343,7 +343,8 @@ module cve2_controller #( // - while in debug mode [Debug Spec v0.13.2, p.39], // - while in NMI mode (nested NMIs are not supported, NMI has highest priority and // cannot be interrupted by regular interrupts). - assign handle_irq = ~debug_mode_q & ~nmi_mode_q & + // - while single stepping. + assign handle_irq = ~debug_mode_q & ~debug_single_step_i & ~nmi_mode_q & (irq_nm_i | (irq_pending_i & csr_mstatus_mie_i)); // generate ID of fast interrupts, highest priority to lowest ID