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

Adding back the HWLoop #436

Merged
merged 127 commits into from
Aug 28, 2020
Merged

Conversation

davideschiavone
Copy link
Contributor

@davideschiavone davideschiavone commented Aug 4, 2020

This PR has the HIGHEST priority according to the Core Task Group Plan

  • The HWLoop has been added back to the core

  • It moves the RVC decoder from the IF to the ID stage

  • It uses a new prefetcher

It has major changes, so before merging:

  • 2 or more users should check the synthesis results in TIMING and AREA

  • The CI check in core-v-verif should not be broken

In the PULP team, we already checked the synthesis. Functional bugs not yet.
I ask @Silabs-ArjanB to carefully review the PR and check at least the synthesis
Adding @MikeOpenHWGroup for the sanity check on core-v-verif

A new hwlp test has been added. However, it is here only temporanely as it must be moved to core-v-verif (together with the interrupt test)

davideschiavone and others added 30 commits December 10, 2019 11:46
…the ID stage as the

IF stage is now acting only as a FIFO
// Todo: check this. The message does not seem coherent with the condition and why is this condition an error?
if ( (hwlp_end_addr_i[1] == pc_id_i + 4 && hwlp_counter_i[1] > 1) && (hwlp_end_addr_i[0] == pc_id_i + 4 && hwlp_counter_i[0] > 1))
begin
`ifndef SYNTHESIS
Copy link
Contributor

Choose a reason for hiding this comment

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

No ifdef/ifndef allowed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mp-17 change to illegal statements plus assertion pls

hwlp_dec_cnt_o[1] = 1'b1;
end

if (debug_single_step_i && ~debug_mode_q)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this added? I am not saying it is wrong or right; it just seems to have nothing to do with HWLP. Is this a bug fix for something else?

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 think it has to do with debug during HWLoop. However I don't think it has been tested

Copy link
Contributor

@Silabs-ArjanB Silabs-ArjanB left a comment

Choose a reason for hiding this comment

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

Please see comments. Biggest change I request is to move the aligner back to IF.

Please also provide a cycle count comparison as was done for the OBI change, i.e. run entire compliance suite with an without wait states and compare cycle count against master branch.

hwlp_mask_o = 1'b0;
branch_is_jump_o = jump_in_dec; // To the aligner, to save the JUMP if ID is stalled

hwlp_end0_eq_pc = hwlp_end_addr_i[0] == pc_id_i;
Copy link
Contributor

Choose a reason for hiding this comment

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

Move line 325-338, 341 outside this always_comb block into a generate statement based on PULP_XPULP (maybe combine with the generate statement requested in line 1301.

I don't understand why is_hwlp_illegal is treated different.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done. Same question as above, why is it different? what do you mean?

Copy link
Contributor

@Silabs-ArjanB Silabs-ArjanB left a comment

Choose a reason for hiding this comment

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

We just received feedback from our backend team that the original design is already unbalanced and therefore we are now asking that both the compressed decoder and the aligner remain in the IF stage (to not make the problem even worse).

@davideschiavone
Copy link
Contributor Author

Please see comments. Biggest change I request is to move the aligner back to IF.

Please also provide a cycle count comparison as was done for the OBI change, i.e. run entire compliance suite with an without wait states and compare cycle count against master branch.

Done in the last commits

if (fetch_is_hwlp)
hwlp_dec_cnt_id_o <= hwlp_dec_cnt_if;

pc_id_o <= pc_if_o;
end else if (clear_instr_valid_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.

Although this code was already there, could you please add a comment on why clear_instr_valid_i is lower priority than 'if_valid && instr_valid'?

(
.instr_i ( instr_aligned ),
.instr_o ( instr_decompressed ),
.is_compressed_o ( instr_compressed_int ),
Copy link
Contributor

Choose a reason for hiding this comment

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

rename instr_compressed_int to is_compressed in this file

Copy link
Contributor

@Silabs-ArjanB Silabs-ArjanB left a comment

Choose a reason for hiding this comment

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

Thank you for moving aligner and RVC back to the IF stage!

@davideschiavone
Copy link
Contributor Author

Hi @MikeOpenHWGroup , this branch seems to be ready to merge. Can we have the last CI "greenlight" from you on this branch?
thanks a lot

@MikeOpenHWGroup
Copy link
Member

@davideschiavone, @Silabs-ArjanB, I will regress this now. Note that @strichmo, has a fork of the testbench that introduces a lot of new interrupt testing and this is also ready for merging. So Steve and I will co-ordinate regressions of this PR. Stay tuned.

@MikeOpenHWGroup
Copy link
Member

@davideschiavone, I have run both the ci_check and MetricsCI regressions on a fork of the RTL that is a merge of the head of cv32e40p and this pull-request. No unexpected failures, so from my end you are good-to-go to merge in this pr.

Please allow @strichmo time to respond to this pr before merging.

@davideschiavone
Copy link
Contributor Author

Amazing news @MikeOpenHWGroup ! Really good news! So @Silabs-ArjanB , let's wait for @strichmo and then we are good to go

@davideschiavone davideschiavone changed the title [DO NOT MERGE] Adding back the HWLoop Adding back the HWLoop Aug 28, 2020
@davideschiavone davideschiavone merged commit 7c65d1a into openhwgroup:master Aug 28, 2020
@strichmo
Copy link
Contributor

My regression tests are clean. I am OK to proceed with merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants