diff options
| author | Andrew Waterman | 2015-08-05 01:28:58 -0700 |
|---|---|---|
| committer | Andrew Waterman | 2015-08-05 01:28:58 -0700 |
| commit | 1f2383fb61ca7c4e4def0c7c4ee1a19e58c36288 (patch) | |
| tree | c43ae73dba5d971828e37ddb5ab8f5fa2947e7fb /src/main/scala/Chisel/FP.scala | |
| parent | 4dc84e2f57be972287d77caca3121b21d0c79b56 (diff) | |
Use Width object, not Int
Please, no more -1
Diffstat (limited to 'src/main/scala/Chisel/FP.scala')
| -rw-r--r-- | src/main/scala/Chisel/FP.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/Chisel/FP.scala b/src/main/scala/Chisel/FP.scala index 4e9a84d4..17ef0df8 100644 --- a/src/main/scala/Chisel/FP.scala +++ b/src/main/scala/Chisel/FP.scala @@ -78,10 +78,10 @@ object FloPrimOp { } import FloPrimOp._ -class Flo(dir: Direction = NO_DIR, val value:Option[Float] = None) extends Element(dir, 32) with Num[Flo] { +class Flo(dir: Direction = NO_DIR, val value:Option[Float] = None) extends Element(dir, Width(32)) with Num[Flo] { type T = Flo; override def floLitValue: Float = value.get - def cloneTypeWidth(width: Int): this.type = cloneType + def cloneTypeWidth(width: Width): this.type = cloneType override def fromBits(n: Bits): this.type = { val d = cloneType pushCommand(DefPrim(d, d.toType, BitsToFlo, Array(this.ref), NoLits)) @@ -189,14 +189,14 @@ object DblPrimOp { } import DblPrimOp._ -class Dbl(dir: Direction, val value: Option[Double] = None) extends Element(dir, 64) with Num[Dbl] { +class Dbl(dir: Direction, val value: Option[Double] = None) extends Element(dir, Width(64)) with Num[Dbl] { // setIsSigned // override def setIsTypeNode = {inputs(0).setIsSigned; super.setIsTypeNode} type T = Dbl; override def dblLitValue: Double = value.get - def cloneTypeWidth(width: Int): this.type = cloneType + def cloneTypeWidth(width: Width): this.type = cloneType override def fromBits(n: Bits): this.type = { val d = cloneType pushCommand(DefPrim(d, d.toType, BitsToDbl, Array(this.ref), NoLits)) |
