DRAFT: Generate C headers and fix small RTL bug in register file#150
Draft
da-gazzi wants to merge 4 commits into
Draft
DRAFT: Generate C headers and fix small RTL bug in register file#150da-gazzi wants to merge 4 commits into
da-gazzi wants to merge 4 commits into
Conversation
23e5567 to
3bd73d2
Compare
DanielKellerM
added a commit
that referenced
this pull request
Jul 9, 2026
stream_idx_o was driven by a last-wins scan over launch_pending, decoupled from the rr_arb_tree grant. With NumRegs>1 and multiple config ports launching different streams concurrently, the arbiter grants one port's dma_req_o while stream_idx_o points at another port's stream, so the transfer is tracked and completed under the wrong stream. Drive stream_idx_o from the arbiter's winning index (rr_arb_tree idx_o), gated by req_valid_o, so it always matches dma_req_o. NumRegs=1 was unaffected, which is why the existing tests missed it. Add a NumRegs=2 directed test: two ports launch on distinct streams, checking stream_idx_o matches the arbitrated port's stream. Fails pre-fix, passes after. Flagged by da-gazzi (#150).
3bd73d2 to
76bcd8e
Compare
- Needed for the mosaic organization fork
- Use `subprocess.run`/`subprocess.check_output` rather than `os.popen` - Make some functions for invoking git commands rather than spelling out the commands as strings - Make the `deploy` target accept overridable `inputs` so the generated hardware can be changed without having to make a separate commit
- This target generates C headers in `target/sw` with both the `raw-header` and `c-header` PeakRDL plugins - Also added to `deploy` CI job
- with `NumRegs>1`, if a new ID is read on multiple register interfaces simultaneously, `stream_idx_o` was set to the stream index that the highest regfile index is reading from. This is incorrect as it ignores the result of the arbitration between the different regfiles - this commit changes this behavior to correctly arbitrate `stream_idx` along with the ID so that `stream_idx_o` is set to the index of the stream the granted ID read belongs to
76bcd8e to
487c78d
Compare
DanielKellerM
added a commit
that referenced
this pull request
Jul 10, 2026
stream_idx_o was driven by a last-wins scan over launch_pending, decoupled from the rr_arb_tree grant. With NumRegs>1 and multiple config ports launching different streams concurrently, the arbiter grants one port's dma_req_o while stream_idx_o points at another port's stream, so the transfer is tracked and completed under the wrong stream. Drive stream_idx_o from the arbiter's winning index (rr_arb_tree idx_o), gated by req_valid_o, so it always matches dma_req_o. NumRegs=1 was unaffected, which is why the existing tests missed it. Add a NumRegs=2 directed test: two ports launch on distinct streams, checking stream_idx_o matches the arbitrated port's stream. Fails pre-fix, passes after. Flagged by da-gazzi (#150).
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.
target/swwith both theraw-headerandc-headerPeakRDL pluginsdma_ctrl_rsp_o.readyin the register file top-level templatestream_idxin the register frontendBased on the CI PR; should be merged after that