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

Prioritize coprocessor FPU reqs over core FPU reqs #3676

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

jerryz123
Copy link
Contributor

This avoids deadlock conditions due to coprocessor requests typically being from older instructions.

Related issue:

Type of change: bug report | feature request | other enhancement

Impact: no functional change | API addition (no impact on existing code) | API modification

Development Phase: proposal | implementation

Release Notes

@jerryz123 jerryz123 changed the title [WIP] Prioritize coprocessor FPU reqs over core FPU reqs Prioritize coprocessor FPU reqs over core FPU reqs Aug 20, 2024
Co-processor reqs will generally be post-commit, from older instructions.
Prioritizing these requests avoids deadlock cases.
@sequencer
Copy link
Member

But why it will deadlock, I don't understand. It sounds like the deadlock is coming from the structural hazard between scalar and vec/rocc. However they basically has no real dependencies?

@jerryz123
Copy link
Contributor Author

Suppose a older vector is trying to use the FPU, while the core is trying to execute a younger vector instruction, which needs the FPU at the X stage to access the FP operand. If the younger instruction is given priority, it will read the operand, but then potentially stall+replay at the W stage due to vector unit being busy.

Generally, in such a simple pipeline, prioritizing the oldest in-flight operation will avoid deadock conditions.

@jerryz123 jerryz123 merged commit 4b50cbb into dev Sep 9, 2024
28 checks passed
@jerryz123 jerryz123 deleted the cp_prio branch September 9, 2024 17:14
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.

2 participants