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

Changed logic for sequence progress detection #638

Merged

Conversation

silabs-oysteink
Copy link
Contributor

Swapped the RTL detection logic with the logic used in the SVA file. This is done to avoid a combinatorial loop is using 'seq_valid' to calculate first_op of the IF stage.

First PR of a series to clean up Zc code and in particular handling of first_op and last_op.

SEC not determined at the time of PR (for both ZC_EXT=0 and ZC_EXT=1)

…B and ID by using flipflops, and the SVA part uses the old combinatorial method. Done to avoid combinatorial loops in future cleanup.

SEC is undetermined at the point of commit.

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
@Silabs-ArjanB Silabs-ArjanB added the Component:RTL For issues in the RTL (e.g. for files in the rtl directory) label Aug 5, 2022
.first_op_if_i (core_i.first_op_if),
.first_op_ex_i (core_i.first_op_ex),
.instr_valid_if_i (core_i.if_stage_i.prefetch_valid),
.ptr_in_if_i (core_i.if_stage_i.prefetch_is_tbljmp_ptr),
Copy link
Contributor

Choose a reason for hiding this comment

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

No signal renaming like this in connections, especially because ptr_in_if seems to imply both table jump pointer and clic pointer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will fix it.

logic id_stage_haltable;

assign sequence_interruptible = !sequence_in_progress_wb;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

sequence_in_progress_wb <= 1'b0;
end else begin
if (!sequence_in_progress_wb) begin
if (wb_valid_i && ex_wb_pipe_i.first_op && !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.

I would expect this to also be qualified by ex_wb_pipe_i.instr_valid; shouldn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That should not be needed, as wb_valid_i already depends on ex_wb_pipe_i.instr_valid

end
end else begin
// sequence_in_progress_wb is set, clear when last_op retires
if (wb_valid_i && 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.

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same reply as above

end
end

// Helper logic to track first_op and last_op through the ID stage to detect unhaltable sequences
Copy link
Contributor

Choose a reason for hiding this comment

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

Update comment; this is not 'helper logic'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will update

end
end else begin
// sequence_in_progress_id is set, clear when last_op retires
if (id_valid_i && ex_ready_i && last_op_id_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.

Same remarks as above related to usage of isntr_valid. Is adding the instr_valid signals a SEC clean change?

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 would likely be SEC clean, but as for the others the instr_valid is baked into the valid

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
@Silabs-ArjanB Silabs-ArjanB merged commit e4d8adc into openhwgroup:master Aug 5, 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.

None yet

2 participants