From b533bdf2579da2b8442497a7c38e3e2727703a08 Mon Sep 17 00:00:00 2001 From: Matteo Perotti Date: Wed, 21 Dec 2022 14:02:30 +0100 Subject: [PATCH] [hardware] :bug: Let subsequent vfdiv/vfsqrt execute --- hardware/src/lane/vmfpu.sv | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hardware/src/lane/vmfpu.sv b/hardware/src/lane/vmfpu.sv index 5121f396e..8338ab568 100644 --- a/hardware/src/lane/vmfpu.sv +++ b/hardware/src/lane/vmfpu.sv @@ -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