Repository navigation
[mailbox, vendor] Skip mailbox full interrupts for one cycle after reset - #770
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the mailbox we use
fifo_v3s, where thefifo_v3is a wrapper of theprim_fifo_sync.prim_fifo_synccontains awready_oand afull_osignal to communicate its conditions, but thefifo_v3wrapper flattens these into one singlefull_osignal, as follows:The issue is that the nested
prim_fifo_synckeeps itswready_osignal as unready for an extra cycle after reset, which is reported as full by thefifo_v3. The mailbox after reset reads this full value of thefifo_v3, and latches the value into the IRQ status register, which triggers an interrupt as soon as interrupts are enabled if it is not cleared. We shouldn't have to do this clear before enabling interrupts.If we alter the wrapper to not report full after a reset, even though the nested
prim_fifo_syncis not ready, we risk the issue of silently losing data on a write in the case that a write happens at the same time.Therefore, the better approach is that we instead alter the mailbox so that interrupts for the full condition are not allowed to be set on the cycle directly after a reset, which is anyways not possible, since the fifo cannot be full directly after reset.
This PR closes issue #754