File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -997,6 +997,15 @@ module ibex_controller #(
997
997
// If there's a pending exception req that doesn't need a PC set we must not see one
998
998
`ASSERT (IbexNoPCSetOnSpecialReqIfNotExpected,
999
999
exception_req_pending && ! expect_exception_pc_set | - > ~ pc_set_o)
1000
+
1001
+ // If entering or exiting debug mode, the pipeline must be flushed. This is because Ibex
1002
+ // currently does not support some of the pipeline stages being in debug mode; either all or
1003
+ // none of the pipeline stages must be in debug mode. As `flush_id_o` only affects the ID/EX
1004
+ // stage but does not prevent a fetched instruction from proceeding to ID/EX the next cycle, the
1005
+ // assertion additionally requires `pc_set_o`, which sets the PC in the IF stage to a new value,
1006
+ // hence preventing a fetched instruction from proceeding to the ID/EX stage in the next cycle.
1007
+ `ASSERT (IbexPipelineFlushOnChangingDebugMode,
1008
+ debug_mode_d != debug_mode_q | - > flush_id_o & pc_set_o)
1000
1009
`endif
1001
1010
1002
1011
`ifdef RVFI
You can’t perform that action at this time.
0 commit comments