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

A RV64 with usingVM=false config will throw firrtl exception #3409

Open
DecodeTheEncoded opened this issue Jul 8, 2023 · 0 comments
Open
Labels

Comments

@DecodeTheEncoded
Copy link

It's true that this is an unsual config, but maybe it's worth initiating an issue, I setup a RV64 with usingVM being false, and the firrtl lowering will complain about the following:
PTW.scala:298: High index 26 is out of range [0, 20] in class freechips.rocketchip.rocket.PT
The loc in line 298 of PTW.scala is :
val (r_tag, r_idx) = Split(Cat(r_req.vstage1, r_req.addr(maxSVAddrBits-pgIdxBits-1, 0)), idxBits)
the r_req.addr is vpnBits width, and it's (paddrBits + 1) min xLen when usingVM is false, but the up index maxSVAddrBits-pgIdxBits-1 seems always expect the usingVM is true. Therefore there is an out-of-range exception.
I don't know if it's worth fixing, but just post here so that others can be aware of this.
Thanks for your work.

@sequencer sequencer added the bug label Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants