From d4a71faedc366573436f8d0f02e143b9147415ff Mon Sep 17 00:00:00 2001 From: Enrico Zelioli Date: Mon, 24 Jul 2023 01:52:47 +0200 Subject: [PATCH] csr_regfile/clic: Leave wfi on CLIC interrupt Co-authored-by: Enrico Zelioli --- core/csr_regfile.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/csr_regfile.sv b/core/csr_regfile.sv index 8a9891eb08..28e0376fad 100644 --- a/core/csr_regfile.sv +++ b/core/csr_regfile.sv @@ -1937,7 +1937,7 @@ module csr_regfile import ariane_pkg::*; #( wfi_d = wfi_q; // if there is any (enabled) interrupt pending un-stall the core // also un-stall if we want to enter debug mode - if (|(mip_q & mie_q) || debug_req_i || irq_i[1]) begin + if (debug_req_i || (!clic_mode_o && (|(mip_q & mie_q) || irq_i[1])) || clic_irq_ready_o) begin wfi_d = 1'b0; // or alternatively if there is no exception pending and we are not in debug mode wait here // for the interrupt