File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -147,9 +147,9 @@ module cv32e40x_controller_bypass import cv32e40x_pkg::*;
147
147
(ex_wb_pipe_i.instr_valid && (ex_wb_pipe_i.csr_en || (ex_wb_pipe_i.sys_en && ex_wb_pipe_i.sys_mret_insn) || ex_wb_pipe_i.instr_meta.clic_ptr || ex_wb_pipe_i.instr_meta.mret_ptr))
148
148
);
149
149
150
- // Stall ID when WFI or WFE is active in EX.
151
- // Prevent load/store following a WFI or WFE in the pipeline
152
- assign ctrl_byp_o.wfi_wfe_stall = (id_ex_pipe_i.sys_en && (id_ex_pipe_i.sys_wfi_insn || id_ex_pipe_i.sys_wfe_insn) && id_ex_pipe_i.instr_valid);
150
+ // Stall ID when instruction that can trigger sleep (e.g. WFI or WFE) is active in EX.
151
+ // Prevent load/store following a sleep instruction in the pipeline
152
+ assign ctrl_byp_o.sleep_stall = (id_ex_pipe_i.sys_en && (id_ex_pipe_i.sys_wfi_insn || id_ex_pipe_i.sys_wfe_insn) && id_ex_pipe_i.instr_valid);
153
153
154
154
// Stall ID when mnxti CSR is accessed in EX
155
155
// This is needed because the data bypass from EX uses csr_rdata, and for mnxti this is actually mstatus and not the result
Original file line number Diff line number Diff line change 21
21
// //
22
22
// Additional contributions by: //
23
23
// //
24
- // Design Name: cv32e40x_controller_fsm //
24
+ // Design Name: cv32e40x_controller_fsm //
25
25
// Project Name: CV32E40X //
26
26
// Language: SystemVerilog //
27
27
// //
@@ -651,7 +651,7 @@ module cv32e40x_controller_fsm import cv32e40x_pkg::*;
651
651
// - If not checking for id_stage_haltable for interrupts and debug, the core could end up in a situation where it tries to create a bubble
652
652
// by halting ID, but the condition disallowing interrupt or debug will not disappear until the sequence currently handled by the ID stage
653
653
// is done. This would create an unrecoverable deadlock.
654
- ctrl_fsm_o.halt_id = (ctrl_byp_i.jalr_stall || ctrl_byp_i.load_stall || ctrl_byp_i.csr_stall || ctrl_byp_i.wfi_wfe_stall || ctrl_byp_i.mnxti_id_stall) ||
654
+ ctrl_fsm_o.halt_id = (ctrl_byp_i.jalr_stall || ctrl_byp_i.load_stall || ctrl_byp_i.csr_stall || ctrl_byp_i.sleep_stall || ctrl_byp_i.mnxti_id_stall) ||
655
655
((pending_interrupt || pending_nmi || pending_nmi_early) && debug_interruptible && id_stage_haltable) ||
656
656
((pending_async_debug || pending_sync_debug) && id_stage_haltable);
657
657
Original file line number Diff line number Diff line change @@ -1309,7 +1309,7 @@ typedef struct packed {
1309
1309
logic jalr_stall; // Stall due to JALR hazard (JALR used result from EX or LSU result in WB)
1310
1310
logic load_stall; // Stall due to load operation
1311
1311
logic csr_stall;
1312
- logic wfi_wfe_stall;
1312
+ logic sleep_stall; // Stall ID due to sleep (e.g. WFI, WFE) instruction in EX
1313
1313
logic mnxti_id_stall; // Stall ID due to mnxti CSR access in EX
1314
1314
logic mnxti_ex_stall; // Stall EX due to LSU instruction in WB
1315
1315
logic minstret_stall; // Stall due to minstret/h read in EX
You can’t perform that action at this time.
0 commit comments