diff --git a/src/main/scala/amba/axis/Bundles.scala b/src/main/scala/amba/axis/Bundles.scala index be107726cab..c8a7832d8e2 100644 --- a/src/main/scala/amba/axis/Bundles.scala +++ b/src/main/scala/amba/axis/Bundles.scala @@ -18,10 +18,7 @@ case class AXISIdField (width: Int) extends SimpleBundleField(AXISId) (Output( case class AXISDestField(width: Int) extends SimpleBundleField(AXISDest)(Output(UInt(width.W)), 0.U) case class AXISKeepField(width: Int) extends SimpleBundleField(AXISKeep)(Output(UInt(width.W)), ~0.U(width.W)) case class AXISStrbField(width: Int) extends SimpleBundleField(AXISStrb)(Output(UInt(width.W)), ~0.U(width.W)) -case class AXISDataField(width: Int) extends BundleField(AXISData) { - def data = Output(UInt(width.W)) - def default(x: UInt): Unit = { x := DontCare } -} +case class AXISDataField(width: Int) extends BundleField[UInt](AXISData, Output(UInt(width.W)), _ := DontCare) class AXISBundleBits(val params: AXISBundleParameters) extends BundleMap(AXISBundle.keys(params)) { def last = if (params.hasLast) apply(AXISLast) else true.B diff --git a/src/main/scala/amba/package.scala b/src/main/scala/amba/package.scala index 11c9f5e1cea..2af015abd9b 100644 --- a/src/main/scala/amba/package.scala +++ b/src/main/scala/amba/package.scala @@ -17,23 +17,18 @@ package object amba { } case object AMBAProt extends ControlKey[AMBAProtBundle]("amba_prot") - case class AMBAProtField() extends BundleField(AMBAProt) { - def data = Output(new AMBAProtBundle) - def default(x: AMBAProtBundle): Unit = { - x.bufferable := false.B - x.modifiable := false.B - x.readalloc := false.B - x.writealloc := false.B - x.privileged := true.B - x.secure := true.B - x.fetch := false.B - } - } + + case class AMBAProtField() extends BundleField[AMBAProtBundle](AMBAProt, Output(new AMBAProtBundle), x => { + x.bufferable := false.B + x.modifiable := false.B + x.readalloc := false.B + x.writealloc := false.B + x.privileged := true.B + x.secure := true.B + x.fetch := false.B + }) // Used to convert a TileLink corrupt signal into an AMBA user bit case object AMBACorrupt extends DataKey[Bool]("corrupt") - case class AMBACorruptField() extends BundleField(AMBACorrupt) { - def data = Output(Bool()) - def default(x: Bool): Unit = { x := false.B } - } -} + case class AMBACorruptField() extends BundleField[Bool](AMBACorrupt, Output(Bool()), x => x := false.B) +} \ No newline at end of file