Skip to content
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

Merged

Conversation

silabs-oysteink
Copy link
Contributor

Blanking interrupts for one cycle after a Load/Store instruction leaves WB.

Refactored some CLIC assertions (new file for clic_int_controller_sva)

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]>
@@ -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;
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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)

Copy link
Contributor Author

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.

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -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,
Copy link
Contributor

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

Copy link
Contributor Author

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]>
@Silabs-ArjanB Silabs-ArjanB added the Component:RTL For issues in the RTL (e.g. for files in the rtl directory) label Aug 29, 2022
@Silabs-ArjanB Silabs-ArjanB merged commit 8b59711 into openhwgroup:master Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:RTL For issues in the RTL (e.g. for files in the rtl directory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants