Skip to content

Commit

Permalink
Mask non-enabled interrupts in WFI control (openhwgroup#765)
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca authored Nov 23, 2021
1 parent e7dd85d commit 725a662
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/csr_regfile.sv
Original file line number Diff line number Diff line change
Expand Up @@ -966,9 +966,9 @@ module csr_regfile import ariane_pkg::*; #(
always_comb begin : wfi_ctrl
// wait for interrupt register
wfi_d = wfi_q;
// if there is any interrupt pending un-stall the core
// if there is any (enabled) interrupt pending un-stall the core
// also un-stall if we want to enter debug mode
if (|mip_q || debug_req_i || irq_i[1]) begin
if (|(mip_q & mie_q) || debug_req_i || irq_i[1]) 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
Expand Down

0 comments on commit 725a662

Please sign in to comment.