From 43124af2f3eab9a3491dd2c83c1922b1b7e07c2a Mon Sep 17 00:00:00 2001 From: chick Date: Mon, 6 Jun 2016 15:32:33 -0700 Subject: moved macro def for toUInt() int to Data and made do_asUInt (the macro target) there as an abstract method. This left clock without a do_asUInt, that has been implemented as an exception at this time --- chiselFrontend/src/main/scala/Chisel/Bits.scala | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'chiselFrontend/src/main/scala/Chisel/Bits.scala') diff --git a/chiselFrontend/src/main/scala/Chisel/Bits.scala b/chiselFrontend/src/main/scala/Chisel/Bits.scala index bc8cc8e2..ee6b1dee 100644 --- a/chiselFrontend/src/main/scala/Chisel/Bits.scala +++ b/chiselFrontend/src/main/scala/Chisel/Bits.scala @@ -210,15 +210,6 @@ sealed abstract class Bits(dirArg: Direction, width: Width, override val litArg: def do_asSInt(implicit sourceInfo: SourceInfo): SInt - /** Reinterpret cast to an UInt. - * - * @note value not guaranteed to be preserved: for example, a SInt of width - * 3 and value -1 (0b111) would become an UInt with value 7 - */ - final def asUInt(): UInt = macro SourceInfoTransform.noArg - - def do_asUInt(implicit sourceInfo: SourceInfo): UInt - /** Reinterpret cast to Bits. */ final def asBits(): Bits = macro SourceInfoTransform.noArg @@ -250,9 +241,6 @@ sealed abstract class Bits(dirArg: Direction, width: Width, override val litArg: pushOp(DefPrim(sourceInfo, UInt(w), ConcatOp, this.ref, that.ref)) } - @deprecated("Use asBits, which makes the reinterpret cast more explicit and actually returns Bits", "chisel3") - override def toBits: UInt = do_asUInt(DeprecatedSourceInfo) - override def do_fromBits(that: Bits)(implicit sourceInfo: SourceInfo): this.type = { val res = Wire(this, null).asInstanceOf[this.type] res := that -- cgit v1.2.3