diff options
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/Bits.scala')
| -rw-r--r-- | chiselFrontend/src/main/scala/chisel3/Bits.scala | 55 |
1 files changed, 7 insertions, 48 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/Bits.scala b/chiselFrontend/src/main/scala/chisel3/Bits.scala index 7462708c..f50512f0 100644 --- a/chiselFrontend/src/main/scala/chisel3/Bits.scala +++ b/chiselFrontend/src/main/scala/chisel3/Bits.scala @@ -404,28 +404,6 @@ sealed abstract class Bits(private[chisel3] val width: Width) extends Element wi throwException(s"Cannot call .asFixedPoint on $this") } - /** Reinterpret cast to Bits. */ - @chiselRuntimeDeprecated - @deprecated("Use asUInt, which does the same thing but returns a more concrete type", "chisel3") - final def asBits(implicit compileOptions: CompileOptions): Bits = { - implicit val sourceInfo = DeprecatedSourceInfo - do_asUInt - } - - @chiselRuntimeDeprecated - @deprecated("Use asSInt, which makes the reinterpret cast more explicit", "chisel3") - final def toSInt(implicit compileOptions: CompileOptions): SInt = { - implicit val sourceInfo = DeprecatedSourceInfo - do_asSInt - } - - @chiselRuntimeDeprecated - @deprecated("Use asUInt, which makes the reinterpret cast more explicit", "chisel3") - final def toUInt(implicit compileOptions: CompileOptions): UInt = { - implicit val sourceInfo = DeprecatedSourceInfo - do_asUInt - } - final def do_asBool(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = { width match { case KnownWidth(1) => this(0) @@ -830,7 +808,7 @@ sealed class UInt private[chisel3] (width: Width) extends Bits(width) with Num[U override def do_>= (that: UInt)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = compop(sourceInfo, GreaterEqOp, that) @chiselRuntimeDeprecated - @deprecated("Use '=/=', which avoids potential precedence problems", "chisel3") + @deprecated("Use '=/=', which avoids potential precedence problems", "3.0") final def != (that: UInt)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = this =/= that /** Dynamic not equals operator @@ -927,7 +905,7 @@ sealed class UInt private[chisel3] (width: Width) extends Bits(width) with Num[U } // This is currently a factory because both Bits and UInt inherit it. -trait UIntFactoryBase { +trait UIntFactory { /** Create a UInt type with inferred width. */ def apply(): UInt = apply(Width()) /** Create a UInt port with specified width. */ @@ -1120,7 +1098,7 @@ sealed class SInt private[chisel3] (width: Width) extends Bits(width) with Num[S override def do_>= (that: SInt)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = compop(sourceInfo, GreaterEqOp, that) @chiselRuntimeDeprecated - @deprecated("Use '=/=', which avoids potential precedence problems", "chisel3") + @deprecated("Use '=/=', which avoids potential precedence problems", "3.0") final def != (that: SInt)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = this =/= that /** Dynamic not equals operator @@ -1180,7 +1158,7 @@ sealed class SInt private[chisel3] (width: Width) extends Bits(width) with Num[S } } -trait SIntFactoryBase { +trait SIntFactory { /** Create an SInt type with inferred width. */ def apply(): SInt = apply(Width()) /** Create a SInt type or port with fixed width. */ @@ -1203,7 +1181,7 @@ trait SIntFactoryBase { } } -object SInt extends SIntFactoryBase +object SInt extends SIntFactory sealed trait Reset extends Element with ToBoolable @@ -1310,7 +1288,7 @@ sealed class Bool() extends UInt(1.W) with Reset { def do_asClock(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Clock = pushOp(DefPrim(sourceInfo, Clock(), AsClockOp, ref)) } -trait BoolFactoryBase { +trait BoolFactory { /** Creates an empty Bool. */ def apply(): Bool = new Bool() @@ -1325,7 +1303,7 @@ trait BoolFactoryBase { } } -object Bool extends BoolFactoryBase +object Bool extends BoolFactory package experimental { //scalastyle:off number.of.methods @@ -1652,11 +1630,6 @@ package experimental { def apply(): FixedPoint = apply(Width(), BinaryPoint()) /** Create an FixedPoint type or port with fixed width. */ - @chiselRuntimeDeprecated - @deprecated("Use FixedPoint(width: Width, binaryPoint: BinaryPoint) example FixedPoint(16.W, 8.BP)", "chisel3") - def apply(width: Int, binaryPoint: Int): FixedPoint = apply(Width(width), BinaryPoint(binaryPoint)) - - /** Create an FixedPoint type or port with fixed width. */ def apply(width: Width, binaryPoint: BinaryPoint): FixedPoint = new FixedPoint(width, binaryPoint) /** Create an FixedPoint literal with inferred width from BigInt. @@ -1684,17 +1657,6 @@ package experimental { /** Create an FixedPoint literal with inferred width from Double. * Use PrivateObject to force users to specify width and binaryPoint by name */ - @chiselRuntimeDeprecated - @deprecated("use fromDouble(value: Double, width: Width, binaryPoint: BinaryPoint)", "chisel3") - def fromDouble(value: Double, dummy: PrivateType = PrivateObject, - width: Int = -1, binaryPoint: Int = 0): FixedPoint = { - fromBigInt( - toBigInt(value, binaryPoint), width = width, binaryPoint = binaryPoint - ) - } - /** Create an FixedPoint literal with inferred width from Double. - * Use PrivateObject to force users to specify width and binaryPoint by name - */ def fromDouble(value: Double, width: Width, binaryPoint: BinaryPoint): FixedPoint = { fromBigInt( toBigInt(value, binaryPoint.get), width = width, binaryPoint = binaryPoint @@ -1737,9 +1699,6 @@ package experimental { // implicit class fromDoubleToLiteral(val double: Double) extends AnyVal { implicit class fromDoubleToLiteral(double: Double) { - @deprecated("Use notation <double>.F(<binary_point>.BP) instead", "chisel3") - def F(binaryPoint: Int): FixedPoint = FixedPoint.fromDouble(double, binaryPoint = binaryPoint) - def F(binaryPoint: BinaryPoint): FixedPoint = { FixedPoint.fromDouble(double, Width(), binaryPoint) } |
