From a21a9dffade89247a2f9b6daf80c373c18098a36 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Wed, 22 Jul 2015 17:42:48 -0700 Subject: Fix implementation of asSInt --- src/main/scala/Core.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 } -- cgit v1.2.3