Skip to content

Bypass final RET routing write#304

Open
guosran wants to merge 1 commit into
tancheng:masterfrom
guosran:fix/register-ret-write-bypass-rtl
Open

Bypass final RET routing write#304
guosran wants to merge 1 commit into
tancheng:masterfrom
guosran:fix/register-ret-write-bypass-rtl

Conversation

@guosran

@guosran guosran commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Addresses #292 with a minimized final-RET register bypass fix. This PR only updates RegisterClusterRTL.py and its focused test.

Changes

  • Bypass a same-cycle routing write to the FU path only for the final RET case.
  • Preserve existing register-bank priority for other cases.
  • Add a concrete example as an inline test comment.

No new ports or interfaces are introduced.

@guosran

guosran commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator Author

Concrete example: the final RET control writes routing token 42 into register 3 and reads register 3 for the FU in the same cycle. The register file read sees the old value in that cycle, so this PR bypasses only this exact final-RET routing-write case.

@guosran guosran force-pushed the fix/register-ret-write-bypass-rtl branch from 1cf95b6 to 8569b3e Compare June 25, 2026 14:43
@guosran guosran changed the base branch from kernel-submit to master June 25, 2026 14:51
@guosran guosran marked this pull request as draft June 25, 2026 14:53
@guosran guosran force-pushed the fix/register-ret-write-bypass-rtl branch 2 times, most recently from 53e5fd6 to 341f024 Compare June 25, 2026 19:57
@guosran guosran force-pushed the fix/register-ret-write-bypass-rtl branch from 341f024 to de4427c Compare June 26, 2026 00:11
@guosran guosran marked this pull request as ready for review June 26, 2026 00:34
@guosran

guosran commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator Author

Concrete example:
RET may need the value written by routing crossbar in the same final control step.

same cycle:
routing_xbar writes r3 = 99
RET reads r3

Before:
RET could read the old r3 value from the register bank.

After:
RegisterClusterRTL bypasses the routing write data to the FU/RET path for this final RET case.

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.

1 participant