Skip to content

[mailbox, vendor] Skip mailbox full interrupts for one cycle after reset - #770

Merged
tchilikov-semify merged 1 commit into
lowRISC:mainfrom
tchilikov-semify:mailbox_irq
Nov 6, 2026
Merged

tchilikov-semify merged 1 commit into
lowRISC:mainfrom
tchilikov-semify:mailbox_irq

Conversation

@tchilikov-semify

@tchilikov-semify tchilikov-semify commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

In the mailbox we use fifo_v3s, where the fifo_v3 is a wrapper of the prim_fifo_sync. prim_fifo_sync contains a wready_o and a full_o signal to communicate its conditions, but the fifo_v3 wrapper flattens these into one single full_o signal, as follows:

assign full_o  = full | err | ~wready; 

The issue is that the nested prim_fifo_sync keeps its wready_o signal as unready for an extra cycle after reset, which is reported as full by the fifo_v3. The mailbox after reset reads this full value of the fifo_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_sync is 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

@tchilikov-semify tchilikov-semify linked an issue Nov 6, 2026 that may be closed by this pull request

@raylau1 raylau1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, LGTM.

@tchilikov-semify
tchilikov-semify added this pull request to the merge queue Nov 6, 2026
Merged via the queue into lowRISC:main with commit ea13ecf Nov 6, 2026
6 checks passed
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.

[mailbox] IRQS reads 0x3 after reset

2 participants