diff options
| author | Andrew Waterman | 2015-07-23 13:48:25 -0700 |
|---|---|---|
| committer | Andrew Waterman | 2015-07-23 13:48:25 -0700 |
| commit | 0b69330375e2a8d499d04b32b8c5cf4bc1e8e87b (patch) | |
| tree | e849658c610491ec261332907a122efd147d1232 /src/main/scala/FP.scala | |
| parent | fbb20502008ac74828800e57760ba7edc9c21d60 (diff) | |
Clean up flatten/toBits/fromBits/getWidth
Diffstat (limited to 'src/main/scala/FP.scala')
| -rw-r--r-- | src/main/scala/FP.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/FP.scala b/src/main/scala/FP.scala index 7f2615f3..f7bbaae5 100644 --- a/src/main/scala/FP.scala +++ b/src/main/scala/FP.scala @@ -94,7 +94,7 @@ class Flo(dir: Direction = NO_DIR, val value:Option[Float] = None) extends Eleme } def toType: Kind = FloType(isFlip) def cloneType: this.type = new Flo(dir).asInstanceOf[this.type] - def flatten: Array[Bits] = Array[Bits](toBits) + def flatten: IndexedSeq[Bits] = IndexedSeq(toBits) def fromInt(x: Int): Flo = Flo(x.toFloat).asInstanceOf[this.type] @@ -209,7 +209,7 @@ class Dbl(dir: Direction, val value: Option[Double] = None) extends Element(dir, } def toType: Kind = DblType(isFlip) def cloneType: this.type = new Dbl(dir).asInstanceOf[this.type] - def flatten: Array[Bits] = Array[Bits](toBits) + def flatten: IndexedSeq[Bits] = IndexedSeq(toBits) def fromInt(x: Int): this.type = Dbl(x.toDouble).asInstanceOf[this.type] |
