Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary stalling on EX_rd / ID_(rs1/rs2) when rs2-value is actually an immediate #2

Open
KasperHesse opened this issue Feb 21, 2023 · 1 comment

Comments

@KasperHesse
Copy link
Owner

Instruction sequence

lw x4, 0(x0)
lw x5, 4(x0)

Causes a forwarding stall since the immediate in the second instruction (4) is registered as the rs2-value, even though the rs2-value is unused in LW instructions.

Solution(?): Attach flag that indicates whether rs1/rs2-values are used

@KasperHesse
Copy link
Owner Author

Similar issue occurs with sequence

lw x24, 4(x0)
jal x0, 0xfffffffffffc65bc

Since the jal instruction causes instr[19:15]==0x18.
Can also be solved with a flag

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

No branches or pull requests

1 participant