diff options
| author | Andrew Waterman | 2016-07-31 17:26:11 -0700 |
|---|---|---|
| committer | Andrew Waterman | 2016-07-31 17:26:11 -0700 |
| commit | 8b0fa7826a547f9123277119aabc58f7c75e2ca3 (patch) | |
| tree | 7a67460a7e34f1ce78b03d9f65a444e70d0b4117 /chiselFrontend/src/main/scala/chisel3/core/Bits.scala | |
| parent | 8b66107bffac270be16196d5a852cf3e6808fb0a (diff) | |
Expose asUInt from Data
Deprecating toBits removes the capability to cast an arbitrary
type to UInt. While it's still possible to do so using asBits.asUInt,
this creates boilerplate. (asBits is almost never useful itself.)
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core/Bits.scala')
| -rw-r--r-- | chiselFrontend/src/main/scala/chisel3/core/Bits.scala | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala index 94d808a4..9cca5d9d 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/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 |
