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 #456 #457

Merged

Conversation

silabs-oysteink
Copy link
Contributor

  • Changed when the counter for issued instructions are reset.
    • Some logic that was used to reset counters (through ctrl_fsm.allow_dummy_instr) was instead moved to factor into dummy_insert_o without resetting the counter)
  • Changed how we count instructions (counting when the first operation of an instruction goes from IF to ID, excluding pointers)

Refactored when dummies are allowed to insert and when the counter for issued instructions are reset.

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
…ompletes with last_op.

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
@silabs-oysteink silabs-oysteink added the Component:RTL For issues in the RTL (e.g. for files in the rtl directory) label May 24, 2023
@@ -913,7 +913,9 @@ module cv32e40s_rvfi
if (is_dummy_instr_wb_i) begin
dummy_suppressed_intr <= in_trap[STAGE_WB] || dummy_suppressed_intr;
end else begin
dummy_suppressed_intr <= 1'b0;
if (last_op_wb_i) begin
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs explanation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added comments

rtl/cv32e40s_controller_fsm.sv Show resolved Hide resolved
@@ -676,17 +676,23 @@ module cv32e40s_if_stage import cv32e40s_pkg::*;
generate
if (DUMMY_INSTRUCTIONS) begin : gen_dummy_instr
logic instr_issued; // Used to count issued instructions between dummy instructions
assign instr_issued = if_valid_o && id_ready_i;

// Count instructions when first_op==1 to not count suboperations of sequences
Copy link
Contributor

Choose a reason for hiding this comment

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

Explain why it is important to use first_op as opposed to last_op

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added explanation

rtl/cv32e40s_dummy_instr.sv Show resolved Hide resolved
rtl/cv32e40s_if_stage.sv Outdated Show resolved Hide resolved
Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
@Silabs-ArjanB Silabs-ArjanB merged commit 634c384 into openhwgroup:master May 24, 2023
1 check passed
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.

None yet

2 participants