rocket-chip icon indicating copy to clipboard operation
rocket-chip copied to clipboard

Prioritize coprocessor FPU reqs over core FPU reqs

Open jerryz123 opened this issue 1 year ago • 1 comments

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 avatar Aug 19 '24 07:08 jerryz123

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?

sequencer avatar Aug 22 '24 02:08 sequencer

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 avatar Sep 07 '24 20:09 jerryz123