From e3650a601b87159e1e3b5491b7528399618a12b0 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 11 Aug 2015 16:52:14 -0700 Subject: Remove useless call to getWidth --- src/main/scala/Chisel/Core.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/scala/Chisel/Core.scala b/src/main/scala/Chisel/Core.scala index 6a3758f0..4e662f45 100644 --- a/src/main/scala/Chisel/Core.scala +++ b/src/main/scala/Chisel/Core.scala @@ -775,8 +775,8 @@ sealed class SInt(dir: Direction, width: Width, lit: Option[SLit] = None) extend override def makeLit(value: BigInt): this.type = SInt(value).asInstanceOf[this.type] - def unary_- : SInt = SInt(0, getWidth) - this - def unary_-% : SInt = SInt(0, getWidth) -% this + def unary_- : SInt = SInt(0) - this + def unary_-% : SInt = SInt(0) -% this def +& (other: SInt): SInt = binop(SInt(NO_DIR, (this.width max other.width) + 1), AddOp, other) def + (other: SInt): SInt = this +% other def +% (other: SInt): SInt = binop(SInt(NO_DIR, this.width max other.width), AddModOp, other) -- cgit v1.2.3