summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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
}