diff --git a/t1/src/LaneZvbb.scala b/t1/src/LaneZvbb.scala index a122848aec..d412210844 100644 --- a/t1/src/LaneZvbb.scala +++ b/t1/src/LaneZvbb.scala @@ -28,6 +28,7 @@ class LaneZvbbRequest(datapathWidth: Int) extends VFUPipeBundle { class LaneZvbbResponse(datapathWidth: Int) extends VFUPipeBundle { val data = UInt(datapathWidth.W) + val source2 = UInt(datapathWidth.W) } @instantiable @@ -47,6 +48,11 @@ class LaneZvbb(val parameter: LaneZvbbParam) val zvbbCTZ = (PopCount(scanRightOr(zvbbBRev)) - 1.U).asUInt val zvbbROL = zvbbSrc.rotateLeft(zvbbRs(4, 0)).asUInt val zvbbROR = zvbbSrc.rotateRight(zvbbRs(4, 0)).asUInt + + val zvbbSLL64 = (0.U((parameter.datapathWidth-1).W) ## zvbbSrc.zext).asUInt << zvbbRs(5, 0) + val zvbbSLL = zvbbSLL64(parameter.datapathWidth-1, 0) + val zvbbSLLMSB = zvbbSLL64(2*parameter.datapathWidth-1, parameter.datapathWidth) + response.data := Mux1H(UIntToOH(request.opcode), Seq( zvbbBRev, zvbbBRev8, @@ -55,7 +61,9 @@ class LaneZvbb(val parameter: LaneZvbbParam) zvbbCTZ, zvbbROL, zvbbROR, + zvbbSLL, ) ) + response.source2 = Mux(request.opcode == 7.U, zvbbSLLMSB, 0.U) } diff --git a/t1/src/decoder/Decoder.scala b/t1/src/decoder/Decoder.scala index a9760eca49..861478d411 100644 --- a/t1/src/decoder/Decoder.scala +++ b/t1/src/decoder/Decoder.scala @@ -341,6 +341,7 @@ object Decoder { case _: zvbbUop4.type => BitPat("b0100") case _: zvbbUop5.type => BitPat("b0101") case _: zvbbUop6.type => BitPat("b0110") + case _: zvbbUop7.type => BitPat("b0111") case _ => BitPat.dontCare(4) } case _ => BitPat.dontCare(4) diff --git a/t1/src/decoder/attribute/isCrossread.scala b/t1/src/decoder/attribute/isCrossread.scala index 5787aa1361..34c11bed3d 100644 --- a/t1/src/decoder/attribute/isCrossread.scala +++ b/t1/src/decoder/attribute/isCrossread.scala @@ -56,10 +56,6 @@ object isCrossread { "vwsub.wx", "vwsubu.wv", "vwsubu.wx", - // rv_zvbb - "vwsll.vv", - "vwsll.vx", - "vwsll.vi", ) allMatched.contains(t1DecodePattern.instruction.name) } diff --git a/t1/src/decoder/attribute/zvbbUop.scala b/t1/src/decoder/attribute/zvbbUop.scala index c95cd2ea6a..4fdfbba09d 100644 --- a/t1/src/decoder/attribute/zvbbUop.scala +++ b/t1/src/decoder/attribute/zvbbUop.scala @@ -13,6 +13,7 @@ object zvbbUop3 extends ZvbbUOPType object zvbbUop4 extends ZvbbUOPType object zvbbUop5 extends ZvbbUOPType object zvbbUop6 extends ZvbbUOPType +object zvbbUop7 extends ZvbbUOPType object ZvbbUOP { def apply(t1DecodePattern: T1DecodePattern): Uop = { @@ -24,6 +25,7 @@ object ZvbbUOP { t4 _ -> zvbbUop4, t5 _ -> zvbbUop5, t6 _ -> zvbbUop6, + t7 _ -> zvbbUop7, ).collectFirst { case (fn, tpe) if fn(t1DecodePattern) => tpe }.getOrElse(UopDC)