diff options
| author | Richard Lin | 2016-11-22 00:57:12 -0800 |
|---|---|---|
| committer | Andrew Waterman | 2016-11-22 00:57:12 -0800 |
| commit | 8cb4e0cc38e2bf1ec596ae000caaf8e49c47dc31 (patch) | |
| tree | bafb28474b557c456e12897ef7f6e0ace51535c4 /chiselFrontend/src/main/scala/chisel3/core/Bits.scala | |
| parent | 3c31b9af6b1dc9abde701edb33d4be36c192bad2 (diff) | |
Disallow chained apply (#380)
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core/Bits.scala')
| -rw-r--r-- | chiselFrontend/src/main/scala/chisel3/core/Bits.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala index 354512e1..cab1a82e 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala @@ -478,7 +478,7 @@ sealed class UInt private[core] (width: Width, lit: Option[ULit] = None) final def unary_! () : Bool = macro SourceInfoTransform.noArg - def do_unary_! (implicit sourceInfo: SourceInfo) : Bool = this === 0.U(1) + def do_unary_! (implicit sourceInfo: SourceInfo) : Bool = this === 0.U(1.W) override def do_<< (that: Int)(implicit sourceInfo: SourceInfo): UInt = binop(sourceInfo, UInt(this.width + that), ShiftLeftOp, that) @@ -496,7 +496,7 @@ sealed class UInt private[core] (width: Width, lit: Option[ULit] = None) final def bitSet(off: UInt, dat: Bool): UInt = macro UIntTransform.bitset def do_bitSet(off: UInt, dat: Bool)(implicit sourceInfo: SourceInfo): UInt = { - val bit = 1.U(1) << off + val bit = 1.U(1.W) << off Mux(dat, this | bit, ~(~this | bit)) } |
