Skip to content

Commit

Permalink
[hardware] 🐛 Abort pe_req in case of addrgen exception
Browse files Browse the repository at this point in the history
  • Loading branch information
mp-17 committed Jan 20, 2025
1 parent 49c5cc4 commit 23f5c2d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions hardware/src/ara_sequencer.sv
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,17 @@ module ara_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::i
pe_req_d = pe_req_o;
pe_req_valid_d = pe_req_valid_o;

// Consume the request if acknowledged during a scalar move
if (pe_req_valid_o && &operand_requester_ready)
// Stop requesting if the operations have been completely acknowledged:
// 1) Scalar moves / vcpop / vfirst only need ack from the lanes
if (!ara_req_i.use_vd && !is_store(ara_req_i.op) && &operand_requester_ready)
pe_req_valid_d = 1'b0;
// 2) Unmasked non-indexed loads only need ack from the addrgen
if (no_src_vrf(pe_req_o) && addrgen_ack_i)
pe_req_valid_d = 1'b0;
// 4) In case of an exception, kill the request
if (addrgen_exception_i.valid)
pe_req_valid_d = 1'b0;
// 3) In the other cases, we need an ack from both addrgen and lanes, so keep up the req

// Wait for the address translation
if ((is_load(pe_req_d.op) || is_store(pe_req_d.op)) && addrgen_ack_i) begin
Expand All @@ -542,8 +550,8 @@ module ara_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::i
// Acknowledge the request
state_d = IDLE;
ara_req_ready_o = 1'b1;
ara_resp_o.resp = pe_scalar_resp_i;
ara_resp_valid_o = 1'b1;
ara_resp_o.resp = pe_scalar_resp_i;
pe_scalar_resp_ready_o = pe_scalar_resp_valid_i & ~running_mask_insn_q;
end
end
Expand Down

0 comments on commit 23f5c2d

Please sign in to comment.