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

Representability check description doesn't capture address-wrapping edge cases #293

Open
PRugg-Cap opened this issue Jun 21, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@PRugg-Cap
Copy link
Contributor

The description of the representability check is slightly imprecise in cases where the base or top want to wrap the address space. A correction is described in the bounds section:

if ( (E < (CAP_MAX_E - 1)) & (t[MXLEN: MXLEN - 1] - b[MXLEN - 1] > 1) )
t[MXLEN] = !t[MXLEN]

but not in the representable region section, where it is also relevant:

|==============================================================================
| Configuration | Upper Section (if E + MW &#8804; MXLEN) | Middle Section | Lower Section
| EF=0 | address[MXLEN:E + MW] + ct | T[MW - 1:0] | {E{1'b0}}
| EF=1, i.e. E=0 | address[MXLEN:MW] + ct 2+| T[MW - 1:0]
|==============================================================================

In addition, we need to clarify what happens if the base wraps.

I'll need to think about how to describe this precisely, but just wanted to record the issue so it doesn't get missed. I don't think there's a bug, but somebody trying to implement it just from this description would certainly get confused!

@tariqkurd-repo tariqkurd-repo added the documentation Improvements or additions to documentation label Jul 1, 2024
@tariqkurd-repo
Copy link
Collaborator

PR for this one? @PRugg-Cap ?

@PRugg-Cap
Copy link
Contributor Author

Not yet, sorry, I'll try tomorrow!

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

No branches or pull requests

2 participants