diff --git a/CHANGELOG.md b/CHANGELOG.md index 542eb153d..f84774503 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Force cheshire's sim scripts re-generation - Fix u-boot to support RVV-linux - Fixed src emul check for vector integer extension operation + - Fix vrgather deadlock when the lanes accept the broadcast index request on different cycles ### Added diff --git a/hardware/src/masku/masku.sv b/hardware/src/masku/masku.sv index d2fdccdc2..628460e90 100644 --- a/hardware/src/masku/masku.sv +++ b/hardware/src/masku/masku.sv @@ -556,15 +556,16 @@ module masku import ara_pkg::*; import rvv_pkg::*; #( for (int lane = 0; lane < NrLanes; lane++) begin // Valid address request if the address fifo is not empty and if the valid is not masked masku_vrgat_req_valid_o[lane] = ~vrgat_req_fifo_empty & ~vrgat_req_valid_mask_q[lane]; - // Mask the next valid on this lane if the lane is handshaking - vrgat_req_valid_mask_d[lane] = masku_vrgat_req_ready_i[lane]; + // Mask the next valid on this lane once it has actually handshaked (valid and ready), held until the request pops + if (masku_vrgat_req_valid_o[lane] & masku_vrgat_req_ready_i[lane]) + vrgat_req_valid_mask_d[lane] = 1'b1; end - // Don't mask if all the lanes have handshaked - if (&masku_vrgat_req_ready_i) vrgat_req_valid_mask_d = '0; - - // Pop the current address if all the lanes have handshaked it - if (&(masku_vrgat_req_ready_i | vrgat_req_valid_mask_q) && ~vrgat_req_fifo_empty) vrgat_req_fifo_pop = 1'b1; + // Pop the current address once every lane has handshaked it, then release the mask for the next request + if (&vrgat_req_valid_mask_d && ~vrgat_req_fifo_empty) begin + vrgat_req_fifo_pop = 1'b1; + vrgat_req_valid_mask_d = '0; + end end // Overflow after 16-bits