-
Notifications
You must be signed in to change notification settings - Fork 428
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
Adding back the HWLoop #436
Conversation
…FIFO for 32-only instructions
…the ID stage as the IF stage is now acting only as a FIFO
…state, add FSM state WAIT_ABORT_HWLOOP
…pdated only when id_valid_i is high
// 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 |
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.
No ifdef/ifndef allowed
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.
@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) |
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.
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?
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 think it has to do with debug during HWLoop. However I don't think it has been tested
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.
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.
rtl/cv32e40p_controller.sv
Outdated
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; |
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.
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.
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.
done. Same question as above, why is it different? what do you mean?
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.
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).
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 |
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.
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 ), |
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 instr_compressed_int to is_compressed in this file
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.
Thank you for moving aligner and RVC back to the IF stage!
Hi @MikeOpenHWGroup , this branch seems to be ready to merge. Can we have the last CI "greenlight" from you on this branch? |
@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. |
@davideschiavone, I have run both the Please allow @strichmo time to respond to this pr before merging. |
Amazing news @MikeOpenHWGroup ! Really good news! So @Silabs-ArjanB , let's wait for @strichmo and then we are good to go |
My regression tests are clean. I am OK to proceed with merge! |
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)