summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Waterman2015-07-22 17:42:48 -0700
committerAndrew Waterman2015-07-22 17:42:48 -0700
commita21a9dffade89247a2f9b6daf80c373c18098a36 (patch)
treee5ea738db3196504b1a39d6b174d407c2c99d781 /src
parentcbac1d259f5f607a516967d677fdcb4087527852 (diff)
Fix implementation of asSInt
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/Core.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/scala/Core.scala b/src/main/scala/Core.scala
index bcb5a280..32f314d8 100644
--- a/src/main/scala/Core.scala
+++ b/src/main/scala/Core.scala
@@ -801,7 +801,7 @@ class UInt(dir: Direction, width: Int) extends Bits(dir, width) with Num[UInt] {
}
def asSInt(): SInt = {
- val x = SInt(width = getWidth + 1)
+ val x = SInt(width = getWidth)
pushCommand(DefPrim(x.defd.cid, x.toType, AsSIntOp, Array(ref), NoLits))
x
}