From 1fd2c63e155d44707851bc5223c7c36f12d76f39 Mon Sep 17 00:00:00 2001 From: Ziyue Zhang Date: Mon, 27 May 2024 15:07:40 +0800 Subject: [PATCH] vperm: fix the width of slide element --- src/main/scala/yunsuan/vector/VectorPerm/Permutation.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/yunsuan/vector/VectorPerm/Permutation.scala b/src/main/scala/yunsuan/vector/VectorPerm/Permutation.scala index 3c1434b..8238cc7 100644 --- a/src/main/scala/yunsuan/vector/VectorPerm/Permutation.scala +++ b/src/main/scala/yunsuan/vector/VectorPerm/Permutation.scala @@ -652,7 +652,7 @@ class Permutation extends Module { } // vslideup/vslide1up - val slide_ele = Mux(vslide1up || vslide1dn, 1.U, vs1(xLen, 0)) + val slide_ele = Mux(vslide1up || vslide1dn, 1.U, vs1(xLen - 1, 0)) val slide_bytes = slide_ele << vsew val vslideup_vd_reg0 = Wire(Vec(vlenb, UInt(8.W))) val vslide1up_vd_reg0 = Wire(Vec(vlenb, UInt(8.W)))