Skip to content

Commit

Permalink
[doc] refactor and add all attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas-Wye committed May 26, 2024
1 parent a877927 commit 06cfd9d
Show file tree
Hide file tree
Showing 56 changed files with 19,930 additions and 1 deletion.
112 changes: 111 additions & 1 deletion t1/src/decoder/T1DecodePattern.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import chisel3.util.BitPat
import chisel3.util.experimental.decode.DecodePattern
import org.chipsalliance.rvdecoderdb.Instruction
import org.chipsalliance.t1.rtl.T1Parameter
import org.chipsalliance.t1.rtl.decoder.attribute.isVector
import org.chipsalliance.t1.rtl.decoder.attribute._

@instantiable
class T1DecodeAttributeOM extends Class {
Expand Down Expand Up @@ -57,6 +57,61 @@ case class T1DecodePattern(instruction: Instruction, t1Parameter: T1Parameter) e

// use the attribute w/ [[isVector.value]]
def isVector: isVector = attribute.isVector(this)
def isAdder: isAdder = attribute.isAdder(this)
def isAverage: isAverage = attribute.isAverage(this)
def isCompress: isCompress = attribute.isCompress(this)
def isCrossread: isCrossread = attribute.isCrossread(this)
def isCrosswrite: isCrosswrite = attribute.isCrosswrite(this)
def isDivider: isDivider = attribute.isDivider(this)
def isDontneedexecuteinlane: isDontneedexecuteinlane = attribute.isDontneedexecuteinlane(this)
def isExtend: isExtend = attribute.isExtend(this)
def isFcompare: isFcompare = attribute.isFcompare(this)
def isFfo: isFfo = attribute.isFfo(this)
def isFirstwiden: isFirstwiden = attribute.isFirstwiden(this)
def isFloatmul: isFloatmul = attribute.isFloatmul(this)
def isFloat: isFloat = attribute.isFloat(this)
def isFloattype: isFloattype = attribute.isFloattype(this)
def isFma: isFma = attribute.isFma(this)
def isFother: isFother = attribute.isFother(this)
def isGather16: isGather16 = attribute.isGather16(this)
def isGather: isGather = attribute.isGather(this)
def isId: isId = attribute.isId(this)
def isIndextype: isIndextype = attribute.isIndextype(this)
def isIota: isIota = attribute.isIota(this)
def isItype: isItype = attribute.isItype(this)
def isLogic: isLogic = attribute.isLogic(this)
def isMa: isMa = attribute.isMa(this)
def isMaskdestination: isMaskdestination = attribute.isMaskdestination(this)
def isMasklogic: isMasklogic = attribute.isMasklogic(this)
def isMasksource: isMasksource = attribute.isMasksource(this)
def isMaskunit: isMaskunit = attribute.isMaskunit(this)
def isMulticycle: isMulticycle = attribute.isMulticycle(this)
def isMultiplier: isMultiplier = attribute.isMultiplier(this)
def isMv: isMv = attribute.isMv(this)
def isNarrow: isNarrow = attribute.isNarrow(this)
def isNr: isNr = attribute.isNr(this)
def isOrderreduce: isOrderreduce = attribute.isOrderreduce(this)
def isOther: isOther = attribute.isOther(this)
def isPopcount: isPopcount = attribute.isPopcount(this)
def isReadonly: isReadonly = attribute.isReadonly(this)
def isRed: isRed = attribute.isRed(this)
def isReverse: isReverse = attribute.isReverse(this)
def isSaturate: isSaturate = attribute.isSaturate(this)
def isScheduler: isScheduler = attribute.isScheduler(this)
def isShift: isShift = attribute.isShift(this)
def isSlid: isSlid = attribute.isSlid(this)
def isSpecial: isSpecial = attribute.isSpecial(this)
def isSpecialslot: isSpecialslot = attribute.isSpecialslot(this)
def isSreadvd: isSreadvd = attribute.isSreadvd(this)
def isSwrite: isSwrite = attribute.isSwrite(this)
def isTargetrd: isTargetrd = attribute.isTargetrd(this)
def isUnorderwrite: isUnorderwrite = attribute.isUnorderwrite(this)
def isUnsigned0: isUnsigned0 = attribute.isUnsigned0(this)
def isUnsigned1_f: isUnsigned1_f = attribute.isUnsigned1_f(this)
def isUnsigned1_nf: isUnsigned1_nf = attribute.isUnsigned1_nf(this)
def isVtype: isVtype = attribute.isVtype(this)
def isVwmacc: isVwmacc = attribute.isVwmacc(this)
def isWidenreduce: isWidenreduce = attribute.isWidenreduce(this)

private def documentation: String = InstructionDocumentation(instruction, t1Parameter).toString

Expand All @@ -74,6 +129,61 @@ case class T1DecodePattern(instruction: Instruction, t1Parameter: T1Parameter) e
obj.attributesIn :#= Property(
Seq(
isVector,
isAdder,
isAverage,
isCompress,
isCrossread,
isCrosswrite,
isDivider,
isDontneedexecuteinlane,
isExtend,
isFcompare,
isFfo,
isFirstwiden,
isFloatmul,
isFloat,
isFloattype,
isFma,
isFother,
isGather16,
isGather,
isId,
isIndextype,
isIota,
isItype,
isLogic,
isMa,
isMaskdestination,
isMasklogic,
isMasksource,
isMaskunit,
isMulticycle,
isMultiplier,
isMv,
isNarrow,
isNr,
isOrderreduce,
isOther,
isPopcount,
isReadonly,
isRed,
isReverse,
isSaturate,
isScheduler,
isShift,
isSlid,
isSpecial,
isSpecialslot,
isSreadvd,
isSwrite,
isTargetrd,
isUnorderwrite,
isUnsigned0,
isUnsigned1_f,
isUnsigned1_nf,
isVtype,
isVwmacc,
isWidenreduce,
).map(_.om.as(attributeClassTpe))
)
obj.getPropertyReference
Expand Down
Loading

0 comments on commit 06cfd9d

Please sign in to comment.