Skip to content

Commit

Permalink
[controller] Add assertion on pipeline flush when entering debug mode
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Kurth <adk@lowrisc.org>
  • Loading branch information
andreaskurth committed Dec 16, 2024
1 parent 667fd20 commit c4ead5b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rtl/ibex_controller.sv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c4ead5b

Please sign in to comment.