Skip to content

Commit

Permalink
[hardware] 🐛 Don't start int reduction if resqueue is not empty
Browse files Browse the repository at this point in the history
If the result queue is not empty and we start a reduction, the state
of the ALU goes to INTRA_LANE_REDUCTION. Here, the VRF write back of
the previous instruction does not happen. Moreover, the
INTRA_LANE_REDUCTION needs the result queue for its own purposes.
  • Loading branch information
mp-17 committed Aug 15, 2024
1 parent dc197bb commit 71952c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hardware/src/lane/valu.sv
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,9 @@ module valu import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::idx_width;
// Initialize counters and alu state if the instruction queue was empty
// and the lane is not reducing
if ((vinsn_queue_d.issue_cnt == '0) && !prevent_commit) begin
alu_state_d = is_reduction(vfu_operation_i.op) ? INTRA_LANE_REDUCTION : NO_REDUCTION;
// INTRA_LANE_REDUCTION state needs the result queue
// Start the reduction only if the commit queue (so, the result queue, too) is empty
alu_state_d = is_reduction(vfu_operation_i.op) && (commit_cnt_q == '0) ? INTRA_LANE_REDUCTION : NO_REDUCTION;
// The next will be the first operation of this instruction
// This information is useful for reduction operation
// Initialize reduction-related sequential elements
Expand Down

0 comments on commit 71952c2

Please sign in to comment.