Skip to content

Commit

Permalink
[doc] fix bug of topuop
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas-Wye committed Jun 25, 2024
1 parent fddef3c commit e3d4ffe
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions t1/src/decoder/Decoder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e3d4ffe

Please sign in to comment.