Skip to content

Commit

Permalink
[doc] add missing zero uop and fix error of some attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas-Wye committed Jun 23, 2024
1 parent a9ee870 commit 3fb958a
Show file tree
Hide file tree
Showing 16 changed files with 413 additions and 122 deletions.
21 changes: 13 additions & 8 deletions t1/src/decoder/Decoder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ object Decoder {

object topUop extends T1UopField {
override def genTable(pattern: T1DecodePattern): BitPat = pattern.topUop.value match {
case _: TopT0.type => BitPat("b0000")
case _: TopT1.type => BitPat("b0001")
case _: TopT2.type => BitPat("b0010")
case _: TopT3.type => BitPat("b0011")
case _: TopT5.type => BitPat("b0101")
case _: TopT6.type => BitPat("b0110")
case _: TopT7.type => BitPat("b0111")
case _ => BitPat.dontCare(4)
case _: TopT0.type => BitPat("b000")
case _: TopT1.type => BitPat("b001")
case _: TopT2.type => BitPat("b010")
case _: TopT3.type => BitPat("b011")
case _: TopT5.type => BitPat("b101")
case _: TopT6.type => BitPat("b110")
case _: TopT7.type => BitPat("b111")
case _ => BitPat.dontCare(3)
}
}

Expand Down Expand Up @@ -315,6 +315,11 @@ object Decoder {
case _: shiftUop6.type => BitPat("b0110")
case _ => BitPat.dontCare(4)
}
case zeroCase: ZeroUOPType =>
zeroCase match {
case _: zeroUop0.type => BitPat("b0000")
case _ => BitPat.dontCare(4)
}
case _ => BitPat.dontCare(4)
}
}
Expand Down
1 change: 1 addition & 0 deletions t1/src/decoder/T1DecodePattern.scala
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ case class T1DecodePattern(instruction: Instruction, param: DecoderParam) extend
def isNr: isNr = attribute.isNr(this)
def isOrderreduce: isOrderreduce = attribute.isOrderreduce(this)
def isOther: isOther = attribute.isOther(this)
def isZero: isZero = attribute.isZero(this)
def isPopcount: isPopcount = attribute.isPopcount(this)
def isReadonly: isReadonly = attribute.isReadonly(this)
def isRed: isRed = attribute.isRed(this)
Expand Down
30 changes: 15 additions & 15 deletions t1/src/decoder/attribute/adderUop.scala
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,21 @@ object AdderUOP {
"vwsubu.vx",
"vwsubu.wv",
"vwsubu.wx",
"vadc.vim",
"vadc.vvm",
"vadc.vxm",
"vmadc.vi",
"vmadc.vim",
"vmadc.vv",
"vmadc.vvm",
"vmadc.vx",
"vmadc.vxm",
"vmsbc.vv",
"vmsbc.vvm",
"vmsbc.vx",
"vmsbc.vxm",
"vsbc.vvm",
"vsbc.vxm",
// "vadc.vim",
// "vadc.vvm",
// "vadc.vxm",
// "vmadc.vi",
// "vmadc.vim",
// "vmadc.vv",
// "vmadc.vvm",
// "vmadc.vx",
// "vmadc.vxm",
// "vmsbc.vv",
// "vmsbc.vvm",
// "vmsbc.vx",
// "vmsbc.vxm",
// "vsbc.vvm",
// "vsbc.vxm",
)
allMatched.contains(t1DecodePattern.instruction.name)
}
Expand Down
2 changes: 1 addition & 1 deletion t1/src/decoder/attribute/divUop.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ object DivUOP {
"vrem.vx",
"vremu.vv",
"vremu.vx",
"vfrdiv.vf",
// "vfrdiv.vf",
)
allMatched.contains(t1DecodePattern.instruction.name)
}
Expand Down
14 changes: 7 additions & 7 deletions t1/src/decoder/attribute/floatUop.scala
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ object FloatUop {
"vfsgnj.vv",
"vmfeq.vf",
"vmfeq.vv",
"vfcvt.x.f.v",
"vfmax.vf",
"vfmax.vv",
"vfredmax.vs",
"vfcvt.rtz.xu.f.v",
"vfrsub.vf",
"vfcvt.rtz.x.f.v",
// "vfcvt.x.f.v",
// "vfmax.vf",
// "vfmax.vv",
// "vfredmax.vs",
// "vfcvt.rtz.xu.f.v",
// "vfrsub.vf",
// "vfcvt.rtz.x.f.v",
)
allMatched.contains(t1DecodePattern.instruction.name)
}
Expand Down
48 changes: 47 additions & 1 deletion t1/src/decoder/attribute/isAverage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,53 @@ object isAverage {
allMatched.contains(t1DecodePattern.instruction)
}

def dc(t1DecodePattern: T1DecodePattern): Boolean = false
def dc(t1DecodePattern: T1DecodePattern): Boolean = {
val allMatched = Seq(
"vcpop.m",
"vfclass.v",
"vfcvt.f.x.v",
"vfcvt.f.xu.v",
"vfcvt.rtz.x.f.v",
"vfcvt.rtz.xu.f.v",
"vfcvt.x.f.v",
"vfcvt.xu.f.v",
"vfirst.m",
"vfmv.f.s",
"vfmv.s.f",
"vfncvt.f.f.w",
"vfncvt.f.x.w",
"vfncvt.f.xu.w",
"vfncvt.rod.f.f.w",
"vfncvt.rtz.x.f.w",
"vfncvt.rtz.xu.f.w",
"vfncvt.x.f.w",
"vfncvt.xu.f.w",
"vfrec7.v",
"vfrsqrt7.v",
"vfsqrt.v",
"vfwcvt.f.f.v",
"vfwcvt.f.x.v",
"vfwcvt.f.xu.v",
"vfwcvt.rtz.x.f.v",
"vfwcvt.rtz.xu.f.v",
"vfwcvt.x.f.v",
"vfwcvt.xu.f.v",
"vid.v",
"viota.m",
"vmsbf.m",
"vmsif.m",
"vmsof.m",
"vmv.s.x",
"vmv.x.s",
"vsext.vf2",
"vsext.vf4",
"vsext.vf8",
"vzext.vf2",
"vzext.vf4",
"vzext.vf8",
)
allMatched.contains(t1DecodePattern.instruction.name)
}
}

case class isAverage(value: TriState) extends BooleanDecodeAttribute {
Expand Down
48 changes: 47 additions & 1 deletion t1/src/decoder/attribute/isCrosswrite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,53 @@ object isCrosswrite {
allMatched.contains(t1DecodePattern.instruction)
}

def dc(t1DecodePattern: T1DecodePattern): Boolean = false
def dc(t1DecodePattern: T1DecodePattern): Boolean = {
val allMatched = Seq(
"vcpop.m",
"vfclass.v",
"vfcvt.f.x.v",
"vfcvt.f.xu.v",
"vfcvt.rtz.x.f.v",
"vfcvt.rtz.xu.f.v",
"vfcvt.x.f.v",
"vfcvt.xu.f.v",
"vfirst.m",
"vfmv.f.s",
"vfmv.s.f",
"vfncvt.f.f.w",
"vfncvt.f.x.w",
"vfncvt.f.xu.w",
"vfncvt.rod.f.f.w",
"vfncvt.rtz.x.f.w",
"vfncvt.rtz.xu.f.w",
"vfncvt.x.f.w",
"vfncvt.xu.f.w",
"vfrec7.v",
"vfrsqrt7.v",
"vfsqrt.v",
"vfwcvt.f.f.v",
"vfwcvt.f.x.v",
"vfwcvt.f.xu.v",
"vfwcvt.rtz.x.f.v",
"vfwcvt.rtz.xu.f.v",
"vfwcvt.x.f.v",
"vfwcvt.xu.f.v",
"vid.v",
"viota.m",
"vmsbf.m",
"vmsif.m",
"vmsof.m",
"vmv.s.x",
"vmv.x.s",
"vsext.vf2",
"vsext.vf4",
"vsext.vf8",
"vzext.vf2",
"vzext.vf4",
"vzext.vf8",
)
allMatched.contains(t1DecodePattern.instruction.name)
}
}

case class isCrosswrite(value: TriState) extends BooleanDecodeAttribute {
Expand Down
16 changes: 8 additions & 8 deletions t1/src/decoder/attribute/isFloat.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ object isFloat {
"vfcvt.rtz.xu.f.v",
"vfcvt.x.f.v",
"vfcvt.xu.f.v",
"vfdiv.vf",
"vfdiv.vv",
// "vfdiv.vf",
// "vfdiv.vv",
"vfmacc.vf",
"vfmacc.vv",
"vfmadd.vf",
"vfmadd.vv",
"vfmax.vf",
"vfmax.vv",
"vfmerge.vfm",
// "vfmerge.vfm",
"vfmin.vf",
"vfmin.vv",
"vfmsac.vf",
Expand All @@ -44,7 +44,7 @@ object isFloat {
"vfmul.vf",
"vfmul.vv",
"vfmv.f.s",
"vfmv.s.f",
// "vfmv.s.f",
"vfncvt.f.f.w",
"vfncvt.f.x.w",
"vfncvt.f.xu.w",
Expand All @@ -61,7 +61,7 @@ object isFloat {
"vfnmsac.vv",
"vfnmsub.vf",
"vfnmsub.vv",
"vfrdiv.vf",
// "vfrdiv.vf",
"vfrec7.v",
"vfredmax.vs",
"vfredmin.vs",
Expand All @@ -75,9 +75,9 @@ object isFloat {
"vfsgnjn.vv",
"vfsgnjx.vf",
"vfsgnjx.vv",
"vfslide1down.vf",
"vfslide1up.vf",
"vfsqrt.v",
// "vfslide1down.vf",
// "vfslide1up.vf",
// "vfsqrt.v",
"vfsub.vf",
"vfsub.vv",
"vfwadd.vf",
Expand Down
8 changes: 4 additions & 4 deletions t1/src/decoder/attribute/isMv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ object isMv {
"vfmv.s.f",
"vmv.s.x",
"vmv.x.s",
"vmv1r.v",
"vmv2r.v",
"vmv4r.v",
"vmv8r.v",
// "vmv1r.v",
// "vmv2r.v",
// "vmv4r.v",
// "vmv8r.v",
)
allMatched.contains(t1DecodePattern.instruction.name)
}
Expand Down
48 changes: 47 additions & 1 deletion t1/src/decoder/attribute/isSaturate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,53 @@ object isSaturate {
allMatched.contains(t1DecodePattern.instruction)
}

def dc(t1DecodePattern: T1DecodePattern): Boolean = false
def dc(t1DecodePattern: T1DecodePattern): Boolean = {
val allMatched = Seq(
"vcpop.m",
"vfclass.v",
"vfcvt.f.x.v",
"vfcvt.f.xu.v",
"vfcvt.rtz.x.f.v",
"vfcvt.rtz.xu.f.v",
"vfcvt.x.f.v",
"vfcvt.xu.f.v",
"vfirst.m",
"vfmv.f.s",
"vfmv.s.f",
"vfncvt.f.f.w",
"vfncvt.f.x.w",
"vfncvt.f.xu.w",
"vfncvt.rod.f.f.w",
"vfncvt.rtz.x.f.w",
"vfncvt.rtz.xu.f.w",
"vfncvt.x.f.w",
"vfncvt.xu.f.w",
"vfrec7.v",
"vfrsqrt7.v",
"vfsqrt.v",
"vfwcvt.f.f.v",
"vfwcvt.f.x.v",
"vfwcvt.f.xu.v",
"vfwcvt.rtz.x.f.v",
"vfwcvt.rtz.xu.f.v",
"vfwcvt.x.f.v",
"vfwcvt.xu.f.v",
"vid.v",
"viota.m",
"vmsbf.m",
"vmsif.m",
"vmsof.m",
"vmv.s.x",
"vmv.x.s",
"vsext.vf2",
"vsext.vf4",
"vsext.vf8",
"vzext.vf2",
"vzext.vf4",
"vzext.vf8",
)
allMatched.contains(t1DecodePattern.instruction.name)
}
}

case class isSaturate(value: TriState) extends BooleanDecodeAttribute {
Expand Down
Loading

0 comments on commit 3fb958a

Please sign in to comment.