From c4ead5b78def8e4689637282a2bd58ec8b5bc330 Mon Sep 17 00:00:00 2001 From: Andreas Kurth Date: Mon, 16 Dec 2024 11:22:28 +0000 Subject: [PATCH] [controller] Add assertion on pipeline flush when entering debug mode Signed-off-by: Andreas Kurth --- rtl/ibex_controller.sv | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rtl/ibex_controller.sv b/rtl/ibex_controller.sv index e764af0eb..af5d4b5c3 100644 --- a/rtl/ibex_controller.sv +++ b/rtl/ibex_controller.sv @@ -997,6 +997,11 @@ module ibex_controller #( // If there's a pending exception req that doesn't need a PC set we must not see one `ASSERT(IbexNoPCSetOnSpecialReqIfNotExpected, exception_req_pending && !expect_exception_pc_set |-> ~pc_set_o) + + // If entering or exiting debug mode, the pipeline must be flushed. This is because Ibex + // currently does not support some of the pipeline stages being in debug mode; either all or + // none of the pipeline stages must be in debug mode. + `ASSERT(IbexPipelineFlushOnChangingDebugMode, debug_mode_d != debug_mode_q |-> flush_id_o) `endif `ifdef RVFI