-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Watchpoint triggers refactor #713
Watchpoint triggers refactor #713
Conversation
… once the watchpoint module is inserted between the aligner and mpu. SEC clean. Signed-off-by: Oystein Knauserud <[email protected]>
…PT module. - Split pending_debug into asynchronous and synchronous - Modified the 'sequence_in_progress_wb' to take watchpoint trigger into account, clearing the flag when a trigger is taken. - Various assertion updates related to the RTL changes. Signed-off-by: Oystein Knauserud <[email protected]>
…ter within the LSU. Cosmetic changes. Signed-off-by: Oystein Knauserud <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to review the 3 sva files (will do that next week), but here is my feedback so far.
@@ -458,18 +463,31 @@ module cv32e40x_controller_fsm import cv32e40x_pkg::*; | |||
// - If trigger_match_in_wb is caused by instruction address match, then no side effects will happen for a sequence, and debug mode is entered when the first operation is in WB. | |||
// When a CLIC pointer is in the pipeline stages EX or WB, we must block debug. | |||
// - Debug would otherwise kill the pointer and use the address of the pointer for dpc. A following dret would then return to the mtvt table, losing program progress. | |||
assign debug_allowed = lsu_interruptible_i && !fencei_ongoing && !xif_in_wb && !clic_ptr_in_pipeline && (sequence_interruptible || trigger_match_in_wb); | |||
assign async_debug_allowed = lsu_interruptible_i && !fencei_ongoing && !xif_in_wb && !clic_ptr_in_pipeline && sequence_interruptible; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update above comments
rtl/cv32e40x_load_store_unit.sv
Outdated
// consume the transaction, not letting it through to the MPU. The triger match will | ||
// be returned with the response with WB timing. | ||
|
||
cv32e40x_wpt wpt_i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a generate (and else branch) around this module for the case when we have 0 debug triggers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, added separate SVA module for WPT to accomodate change
rtl/cv32e40x_wb_stage.sv
Outdated
@@ -156,7 +157,7 @@ module cv32e40x_wb_stage import cv32e40x_pkg::*; | |||
|
|||
// Append any MPU exception to abort_op | |||
// An abort_op_o = 1 will terminate a sequence, either to take an exception or debug due to trigger match. | |||
assign abort_op_o = ex_wb_pipe_i.abort_op || ( ex_wb_pipe_i.lsu_en && lsu_exception); | |||
assign abort_op_o = ex_wb_pipe_i.abort_op || ( ex_wb_pipe_i.lsu_en && lsu_exception) || lsu_wpt_match_i; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is ex_wb_pipe_i.lsu_en needed/used for lsu_exception but not for lsu_wpt_match_i (either it should be needed in both places or in no place I would think)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added ex_wb_pipe_i.lsu_en to align with mpu exception.
rtl/cv32e40x_wpt.sv
Outdated
logic wpt_block_bus; | ||
logic wpt_trans_valid; | ||
logic wpt_trans_ready; | ||
logic wpt_match_resp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wpt_match_resp -> wpt_match
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
typedef struct packed { | ||
obi_data_resp_t bus_resp; | ||
mpu_status_e mpu_status; | ||
logic wpt_match; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this causes wpt_match to become non-driven in the dataside MPU. It should be tied off there as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added tieoff in mpu
Guarded instance of cv32e40x_wpt.sv with DBG_NUM_TRIGGERS>0. Updated condition for clearing sequence_in_progress_wb when a wpt match occurs.Comment updates Reintroduced "resp* in LSU, same values as wpt_resp*. SEC clean. Signed-off-by: Oystein Knauserud <[email protected]>
Signed-off-by: Oystein Knauserud <[email protected]>
Added an additional commit as the tieoffs within LSU was not correct if DBG_NUM_TRIGGERS is 0. Ready for review. |
Refactored watchpoint trigger behavior.