Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 slide unit hang when the slide offset is a whole-chunk multiple

### Added

Expand Down
24 changes: 18 additions & 6 deletions hardware/src/ara_dispatcher.sv
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,26 @@ module ara_dispatcher import ara_pkg::*; import rvv_pkg::*; #(

// NP2 Slide support
logic is_stride_np2;
logic [idx_width(idx_width(VLENB << 3)):0] sldu_popc;

// Is the stride power of two?
logic [idx_width(idx_width(8*NrLanes)):0] sldu_popc;

// The SLDU's p2_stride_gen only resolves the WITHIN-CHUNK portion of the slide
// offset (it is idx_width(8*NrLanes) bits wide, matching one VRF chunk); the
// chunk-level portion of the stride is handled by the slide operand addressing.
// is_stride_np2 must therefore be computed on exactly that within-chunk offset
// (element stride truncated to the generator width). Computing it on the full
// stride wrongly sends pure chunk-shift offsets (whose low bits are zero, e.g.
// vslidedown by 48/96, or a sign-extended .vi imm >= 16) into the NP2 path,
// where p2_stride_gen reports popcount 0 and SLIDE_NP2_RUN's popc == 1 exit is
// never reached, hanging the slide unit forever.
logic [idx_width(8*NrLanes)-1:0] sldu_stride_chunk;
assign sldu_stride_chunk = (ara_req.stride >> csr_vtype_q.vsew);

// Is the within-chunk stride a power of two?
popcount #(
.INPUT_WIDTH (idx_width(VLENB << 3))
.INPUT_WIDTH (idx_width(8*NrLanes))
) i_np2_stride (
.data_i (ara_req.stride[idx_width(VLENB << 3)-1:0] ),
.popcount_o(sldu_popc )
.data_i (sldu_stride_chunk),
.popcount_o(sldu_popc )
);

assign is_stride_np2 = sldu_popc > 1;
Expand Down