From e3d4ffea58623d0bef7015da0b0579b18d53efcd Mon Sep 17 00:00:00 2001 From: Lucas-Wye Date: Tue, 25 Jun 2024 19:45:41 +0800 Subject: [PATCH] [doc] fix bug of topuop --- t1/src/decoder/Decoder.scala | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/t1/src/decoder/Decoder.scala b/t1/src/decoder/Decoder.scala index e569953e9d..3ebe07df3b 100644 --- a/t1/src/decoder/Decoder.scala +++ b/t1/src/decoder/Decoder.scala @@ -32,6 +32,14 @@ trait T1UopField extends T1DecodeFiled[UInt] with FieldName { def chiselType: UInt = UInt(4.W) } +trait T1TopUopField extends T1DecodeFiled[UInt] with FieldName { + def chiselType: UInt = UInt(3.W) +} + +trait T1fpExecutionTypeUopField extends T1DecodeFiled[UInt] with FieldName { + def chiselType: UInt = UInt(2.W) +} + object Decoder { object logic extends BoolField { override def getTriState(pattern: T1DecodePattern): TriState = pattern.isLogic.value @@ -213,7 +221,7 @@ object Decoder { override def getTriState(pattern: T1DecodePattern): TriState = pattern.isOrderreduce.value } - object topUop extends T1UopField { + object topUop extends T1TopUopField { override def genTable(pattern: T1DecodePattern): BitPat = pattern.topUop.value match { case _: TopT0.type => BitPat("b000") case _: TopT1.type => BitPat("b001") @@ -324,7 +332,7 @@ object Decoder { } } - object fpExecutionType extends T1UopField { + object fpExecutionType extends T1fpExecutionTypeUopField { override def genTable(pattern: T1DecodePattern): BitPat = pattern.fpExecutionType match { case FpExecutionType.Compare => BitPat("b10") case FpExecutionType.MA => BitPat("b00") @@ -404,18 +412,6 @@ trait FieldName { def name: String = this.getClass.getSimpleName.replace("$", "") } -trait UopField extends DecodeField[Op, UInt] with FieldName { - def chiselType: UInt = UInt(4.W) -} - -trait FloatType extends DecodeField[Op, UInt] with FieldName { - def chiselType: UInt = UInt(2.W) -} - -trait TopUopField extends DecodeField[Op, UInt] with FieldName { - def chiselType: UInt = UInt(3.W) -} - case class SpecialAux(name: String, vs: Int, value: String) case class SpecialMap(name: String, vs: Int, data: Map[String, String]) case class SpecialAuxInstr(instrName: String, vs: Int, value: String, name: String)