Skip to content

[rtl] Fix INTR_STATE clear race from LSR read - #12

Merged
raylau1 merged 1 commit into
mainfrom
fix-intr-clear-race
Nov 17, 2026
Merged

raylau1 merged 1 commit into
mainfrom
fix-intr-clear-race

Conversation

@raylau1

@raylau1 raylau1 commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Closes #10.

@raylau1 raylau1 self-assigned this Nov 13, 2026
This makes sure that only INTR_STATE bits set from the read are
cleared by the following write. Any INTR_STATE bits set between the
two actions will not be cleared.

Signed-off-by: Ray Lau <ray.lau@lowrisc.org>

@marnovandermaas marnovandermaas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks correct to me. Is it worth adding a test as well to be sure?

@raylau1

raylau1 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks Marno, the current pre_dv testbench provides an inactive UART line so we cannot test this through TL-UL accesses alone. I can add more testing as a follow up but I think RTL fixes and hjson/rdl have higher priority currently.

@raylau1
raylau1 merged commit 356f09d into main Nov 17, 2026
1 check passed
@marnovandermaas
marnovandermaas deleted the fix-intr-clear-race branch November 17, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[rtl] Fix INTR_STATE clear race from LSR read

2 participants