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

[i2c,rtl] Reduce NACK count size #22107

Merged

Conversation

marnovandermaas
Copy link
Contributor

Based on the comment by @andreaskurth: #21857 (comment)

The 32 bits for this counter is a bit overkill. 8 bits should probably be enough since that means the software has missed a whole ACQ FIFO full of contents. Beyond this the value loses most of its meaning. This PR also saturates the counter.

Originally this NACK count was 32 bits which is not really necessary.
With 8 bits the software can see up to the depth of the ACQ FIFO worth
of NACKs, beyond that they lose their meaning. The counter should
saturate so that when it reads 0xFF that the software knows it has
exceeded the counter.

Signed-off-by: Marno van der Maas <[email protected]>
Copy link
Contributor

@andreaskurth andreaskurth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx!

After reducing the counter from 32 bits to 8 bits, saturation is now
more likely. This commit saturates the NACK counter at the maximum value
of 0xFF.

Signed-off-by: Marno van der Maas <[email protected]>
@marnovandermaas marnovandermaas merged commit 158f544 into lowRISC:master Mar 19, 2024
15 of 25 checks passed
@hcallahan-lowrisc hcallahan-lowrisc mentioned this pull request Jun 6, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants