Skip to content

Commit

Permalink
[hardware] 🐛 Let subsequent vfdiv/vfsqrt execute
Browse files Browse the repository at this point in the history
  • Loading branch information
mp-17 committed Jun 27, 2024
1 parent aa49c53 commit b533bdf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hardware/src/lane/vmfpu.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1316,9 +1316,11 @@ module vmfpu import ara_pkg::*; import rvv_pkg::*; import fpnew_pkg::*;
// issue only if the new instruction is slower than the previous one.
// VFDIV-like instructions have variable latency, so stall them not to create
// problems.
latency_problem_d = (vinsn_issue_lat_d < vinsn_processing_lat_d) ||
(vinsn_issue_d.op inside {VFDIV, VFRDIV, VFSQRT}) ||
(vinsn_processing_d.op inside {VFDIV, VFRDIV, VFSQRT});
latency_problem_d = (vinsn_issue_lat_d < vinsn_processing_lat_d) ||
(((vinsn_issue_d.op inside {VFDIV, VFRDIV, VFSQRT}) ||
(vinsn_processing_d.op inside {VFDIV, VFRDIV, VFSQRT})) &&
vinsn_issue_d.id != vinsn_processing_d.id);

latency_stall = vinsn_issue_q_valid & vinsn_processing_q_valid & latency_problem_q;

operand_a = (vinsn_issue_q.op == VFRDIV) ? scalar_op : mfpu_operand_i[1]; // vs2
Expand Down

0 comments on commit b533bdf

Please sign in to comment.