-
Notifications
You must be signed in to change notification settings - Fork 167
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
Remove & rename duplicate word_width <-> bytes mappings #436
Remove & rename duplicate word_width <-> bytes mappings #436
Conversation
* Remove the duplicate mapping functions. * Rename to `size_bytes` for consistency with the other two functions. * Rename `size_bits` to `size_enc`, otherwise it's quite confusing that `size_bits` is not just `8 * size_bytes`. Fixes riscv#423
fec3215
to
2c82c30
Compare
@billmcspadden-riscv can we get this landed too? It's a very simple refactoring - no functional changes - but I have a number of upcoming PRs that depend on this. |
@Timmmm: A couple of comments:
|
I agree that size_enc is a lot better than size_bits (which I would expect to return 8/16/etc.). I agree with @billmcspadden-riscv that it's still a somewhat confusing name, but I can't think of anything better so I'm happy with this change. Maybe @jrtc27 or @Alasdair have other suggestions. |
Arguably But anyway since this is an pareto improvement (i.e. it makes some things better and nothing worse) can we land it and then potentially use better names in a future PR? |
Based on @arichardson 's feedback, I'll do the merge.
Bill Mc.
…On Thu, Apr 11, 2024 at 1:06 PM Tim Hutt ***@***.***> wrote:
Arguably word_width is the confusing name here since RISC-V universally
uses "word" to mean "32-bits" not any of the other possible meanings.
But anyway since this is an pareto improvement (i.e. it makes some things
better and nothing worse) can we land it and then potentially use better
names in a future PR?
—
Reply to this email directly, view it on GitHub
<#436 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXROLOCLOKKQUG37FGFJGS3Y43GK7AVCNFSM6AAAAABE5FICVSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJQGIZTINJQGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Bill McSpadden
Formal Verification Engineer
RISC-V International
mobile: 503-807-9309
|
size_bytes
for consistency with the other two functions.size_bits
tosize_enc
, otherwise it's quite confusing thatsize_bits
is not just8 * size_bytes
.Fixes #423