summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/compatibility.scala
diff options
context:
space:
mode:
authorducky2016-11-17 13:50:50 -0800
committerducky2016-11-21 13:32:47 -0800
commitebe7a0fb5774ec4bec919f9d3acd987d084d91b4 (patch)
tree08b892d84030edf9f3b21a17c9c3d5267fb2aeed /src/main/scala/chisel3/compatibility.scala
parenta2b97f8dc9c261ae4dc39ea4e11feed7723e22dd (diff)
better style
Diffstat (limited to 'src/main/scala/chisel3/compatibility.scala')
-rw-r--r--src/main/scala/chisel3/compatibility.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/scala/chisel3/compatibility.scala b/src/main/scala/chisel3/compatibility.scala
index fbe37f50..ff627c1e 100644
--- a/src/main/scala/chisel3/compatibility.scala
+++ b/src/main/scala/chisel3/compatibility.scala
@@ -90,15 +90,15 @@ package object Chisel { // scalastyle:ignore package.object.name
def width(width: Width): SInt = apply(width)
/** Create an SInt literal with inferred width. */
- def apply(value: BigInt): SInt = value.S
+ def apply(value: BigInt): SInt = value.asSInt
/** Create an SInt literal with fixed width. */
- def apply(value: BigInt, width: Int): SInt = value.S(width.W)
+ def apply(value: BigInt, width: Int): SInt = value.asSInt(width.W)
/** Create an SInt literal with specified width. */
- def apply(value: BigInt, width: Width): SInt = value.S(width)
+ def apply(value: BigInt, width: Width): SInt = value.asSInt(width)
- def Lit(value: BigInt): SInt = value.S
- def Lit(value: BigInt, width: Int): SInt = value.S(width.W)
+ def Lit(value: BigInt): SInt = value.asSInt
+ def Lit(value: BigInt, width: Int): SInt = value.asSInt(width.W)
/** Create a SInt with a specified width - compatibility with Chisel2. */
def apply(dir: Option[Direction] = None, width: Int): SInt = apply(width.W)