[rtl] Trim rf_reg addresses for RV32E#1829
Open
ANurmi wants to merge 2 commits intolowRISC:masterfrom
Open
Conversation
Fix for array index out of range with rv32e configuration.
vogelpi
reviewed
Oct 4, 2022
Contributor
vogelpi
left a comment
There was a problem hiding this comment.
Thanks @ANurmi for your PR!
This commit obviously fixes an issue when using RV32E but I think it would actually be better to just parameterize the regfile address widths. However this will be much more invasive. I am not sure what's better. I need to discuss this with the team.
rtl/ibex_register_file_ff.sv
Outdated
| assign rdata_a_o = rf_reg[raddr_a_i]; | ||
| assign rdata_b_o = rf_reg[raddr_b_i]; | ||
|
|
||
| if(RV32E) begin : rv32e_regfile |
Contributor
There was a problem hiding this comment.
I think the missing whitespace between if and (RV32E here causes lint to fail. Can you please run
fusesoc --cores-root . run --target=lint --tool=veriblelint lowrisc:ibex:ibex_top_tracing --RV32E=0 --RV32M=ibex_pkg::RV32MFast --RV32B=ibex_pkg::RV32BNone --RegFile=ibex_pkg::RegFileFF --BranchTargetALU=0 --WritebackStage=0 --ICache=0 --ICacheECC=0 --ICacheScramble=0 --BranchPredictor=0 --DbgTriggerEn=0 --SecureIbex=0 --PMPEnable=0 --PMPGranularity=0 --PMPNumRegions=4 --MHPMCounterNum=0 --MHPMCounterWidth=40
to check?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use trimmed address values to match the 16 registers in RV32E configuration. This fixes top level IbexDataReqPayloadX assert that was being triggered during LW instruction execution with IMM value 'h10 in rs2 register.