-
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
Fix for issue #507 #655
Fix for issue #507 #655
Conversation
Blanking interrupts for one cycle after a load or store has left WB. Refactored some assertions for CLIC, added a separate file for CLIC asserts. Signed-off-by: Oystein Knauserud <[email protected]>
Signed-off-by: Oystein Knauserud <[email protected]>
rtl/cv32e40x_controller_bypass.sv
Outdated
@@ -144,7 +144,12 @@ module cv32e40x_controller_bypass import cv32e40x_pkg::*; | |||
// This is needed because the data bypass from EX uses csr_rdata, and for mnxti this is actually mstatus and not the result | |||
// that will be written to the register file. Could be optimized to only stall when the result from the CSR instruction is used in ID, | |||
// but the common usecase is a CSR access followed by a branch using the mnxti result in the RF, so it would likely stall in most cases anyway. | |||
assign ctrl_byp_o.mnxti_stall = csr_mnxti_read_i; | |||
assign ctrl_byp_o.mnxti_stall_id = csr_mnxti_read_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.
I would prefer the following renaming as _id, _ex postfixes are normally used to indicate signal timing:
mnxti_stall_id -> mnxti_id_stall
mnxti_stall_ex -> mnxti_ex_stall
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.
Fixed
interrupt_blanking_q <= 1'b0; | ||
end else begin | ||
interrupt_blanking_q <= ex_wb_pipe_i.instr_valid && ex_wb_pipe_i.lsu_en && lsu_valid_wb_i; | ||
end |
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.
Is the use of lsu_valid_wb_i even needed? Can you check if it is SEC clean to remove it? (Interrupting WB while waiting for an rvalid should not be allowed anyway)
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.
It is in fact not needed, we are SEC clean without it. Removed.
rtl/include/cv32e40x_pkg.sv
Outdated
@@ -1204,7 +1204,8 @@ typedef struct packed { | |||
logic load_stall; // Stall due to load operation | |||
logic csr_stall; | |||
logic wfi_stall; | |||
logic mnxti_stall; // Stall due to mnxti CSR access in EX | |||
logic mnxti_stall_id; // Stall ID due to mnxti CSR access in EX |
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.
Rename
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.
Fixed
sva/cv32e40x_core_sva.sv
Outdated
@@ -72,24 +72,21 @@ module cv32e40x_core_sva | |||
input logic data_req_o, | |||
input logic data_we_o, | |||
input logic [5:0] data_atop_o, | |||
input logic data_rvalid_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.
Is this signal still used? If not, then remove
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.
Removed
Signed-off-by: Oystein Knauserud <[email protected]>
Blanking interrupts for one cycle after a Load/Store instruction leaves WB.
Refactored some CLIC assertions (new file for clic_int_controller_sva)