Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions core/src/main/scala-2/chisel3/BitsIntf.scala
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ private[chisel3] trait BitsIntf extends ToBoolable { self: Bits =>
private[chisel3] trait UIntIntf { self: UInt =>

// TODO: refactor to share documentation with Num or add independent scaladoc
/** Unary negation (expanding width)
/** Unary negation (constant width)
*
* @return a $coll equal to zero minus this $coll
* $constantWidth
Expand All @@ -287,16 +287,18 @@ private[chisel3] trait UIntIntf { self: UInt =>

/** Unary negation (constant width)
*
* @return a $coll equal to zero minus this $coll shifted right by one.
* @return a $coll equal to zero minus this $coll
* $constantWidth
* @group Arithmetic
*/
@deprecated("Use unary_- which has the same behavior", "Chisel 6.8.0")
final def unary_-% : UInt = macro SourceInfoTransform.noArg

/** @group SourceInfoTransformMacro */
def do_unary_-(implicit sourceInfo: SourceInfo): UInt = _impl_unary_-

/** @group SourceInfoTransformMacro */
@deprecated("Use unary_- which has the same behavior", "Chisel 6.8.0")
def do_unary_-%(implicit sourceInfo: SourceInfo): UInt = _impl_unary_-%

override def do_+(that: UInt)(implicit sourceInfo: SourceInfo): UInt = _impl_+(that)
Expand Down Expand Up @@ -553,12 +555,14 @@ private[chisel3] trait SIntIntf { self: SInt =>
* $constantWidth
* @group Arithmetic
*/
@deprecated("Use unary_- which has the same behavior", "Chisel 6.8.0")
final def unary_-% : SInt = macro SourceInfoTransform.noArg

/** @group SourceInfoTransformMacro */
def do_unary_-(implicit sourceInfo: SourceInfo): SInt = _impl_unary_-

/** @group SourceInfoTransformMacro */
@deprecated("Use unary_- which has the same behavior", "Chisel 6.8.0")
def do_unary_-%(implicit sourceInfo: SourceInfo): SInt = _impl_unary_-%

/** add (default - no growth) operator */
Expand Down
6 changes: 4 additions & 2 deletions core/src/main/scala-3/chisel3/BitsIntf.scala
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private[chisel3] trait BitsIntf extends ToBoolable { self: Bits =>
private[chisel3] trait UIntIntf { self: UInt =>

// TODO: refactor to share documentation with Num or add independent scaladoc
/** Unary negation (expanding width)
/** Unary negation (constant width)
*
* @return a $coll equal to zero minus this $coll
* $constantWidth
Expand All @@ -204,6 +204,7 @@ private[chisel3] trait UIntIntf { self: UInt =>
* $constantWidth
* @group Arithmetic
*/
@deprecated("Use unary_- which has the same behavior", "Chisel 6.8.0")
def unary_-%(using SourceInfo): UInt = _impl_unary_-%

override def +(that: UInt): UInt = _impl_+(that)
Expand Down Expand Up @@ -398,10 +399,11 @@ private[chisel3] trait SIntIntf { self: SInt =>

/** Unary negation (constant width)
*
* @return a hardware $coll equal to zero minus `this` shifted right by one
* @return a hardware $coll equal to zero minus `this` $coll
* $constantWidth
* @group Arithmetic
*/
@deprecated("Use unary_- which has the same behavior", "Chisel 6.8.0")
def unary_-%(using SourceInfo): SInt = _impl_unary_-%

/** add (default - no growth) operator */
Expand Down