diff options
Diffstat (limited to 'src/main/scala/FP.scala')
| -rw-r--r-- | src/main/scala/FP.scala | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main/scala/FP.scala b/src/main/scala/FP.scala index 8b1c2b0a..5ad50a92 100644 --- a/src/main/scala/FP.scala +++ b/src/main/scala/FP.scala @@ -41,7 +41,7 @@ object Flo { def apply(x: Double): Flo = Flo(x.toFloat) def floLit(value: Float): Flo = { val b = new Flo(NO_DIR) - pushCommand(DefFlo(b.defd.id, value)) + pushCommand(DefFlo(b.defd.cid, value)) b } def apply(dir: Direction = null): Flo = @@ -83,12 +83,12 @@ class Flo(dir: Direction = NO_DIR) extends Element(dir, 32) with Num[Flo] { def cloneTypeWidth(width: Int): this.type = cloneType override def fromBits(n: Bits): this.type = { val d = cloneType - pushCommand(DefPrim(d.defd.id, d.toType, BitsToFlo, Array(this.ref), NoLits)) + pushCommand(DefPrim(d.defd.cid, d.toType, BitsToFlo, Array(this.ref), NoLits)) d } override def toBits: Bits = { val d = new UInt(dir, 32) - pushCommand(DefPrim(d.defd.id, d.toType, FloToBits, Array(this.ref), NoLits)) + pushCommand(DefPrim(d.defd.cid, d.toType, FloToBits, Array(this.ref), NoLits)) d } def toType: Kind = FloType(isFlip) @@ -100,17 +100,17 @@ class Flo(dir: Direction = NO_DIR) extends Element(dir, 32) with Num[Flo] { private def flo_unop(op: PrimOp): Flo = { val d = cloneType - pushCommand(DefPrim(d.defd.id, d.toType, op, Array(this.ref), NoLits)) + pushCommand(DefPrim(d.defd.cid, d.toType, op, Array(this.ref), NoLits)) d } private def flo_binop(op: PrimOp, other: Flo): Flo = { val d = cloneType - pushCommand(DefPrim(d.defd.id, d.toType, op, Array(this.ref, other.ref), NoLits)) + pushCommand(DefPrim(d.defd.cid, d.toType, op, Array(this.ref, other.ref), NoLits)) d } private def flo_compop(op: PrimOp, other: Flo): Bool = { val d = new Bool(dir) - pushCommand(DefPrim(d.defd.id, d.toType, op, Array(this.ref, other.ref), NoLits)) + pushCommand(DefPrim(d.defd.cid, d.toType, op, Array(this.ref, other.ref), NoLits)) d } @@ -151,7 +151,7 @@ object Dbl { def apply(x: Double): Dbl = dblLit(x) def dblLit(value: Double): Dbl = { val b = new Dbl(NO_DIR) - pushCommand(DefDbl(b.defd.id, value)) + pushCommand(DefDbl(b.defd.cid, value)) b } def apply(dir: Direction = NO_DIR): Dbl = @@ -197,12 +197,12 @@ class Dbl(dir: Direction = null) extends Element(dir, 64) with Num[Dbl] { def cloneTypeWidth(width: Int): this.type = cloneType override def fromBits(n: Bits): this.type = { val d = cloneType - pushCommand(DefPrim(d.defd.id, d.toType, BitsToDbl, Array(this.ref), NoLits)) + pushCommand(DefPrim(d.defd.cid, d.toType, BitsToDbl, Array(this.ref), NoLits)) d } override def toBits: Bits = { val d = new UInt(dir, 64) - pushCommand(DefPrim(d.defd.id, d.toType, DblToBits, Array(this.ref), NoLits)) + pushCommand(DefPrim(d.defd.cid, d.toType, DblToBits, Array(this.ref), NoLits)) d } def toType: Kind = DblType(isFlip) @@ -214,17 +214,17 @@ class Dbl(dir: Direction = null) extends Element(dir, 64) with Num[Dbl] { private def dbl_unop(op: PrimOp): Dbl = { val d = cloneType - pushCommand(DefPrim(d.defd.id, d.toType, op, Array(this.ref), NoLits)) + pushCommand(DefPrim(d.defd.cid, d.toType, op, Array(this.ref), NoLits)) d } private def dbl_binop(op: PrimOp, other: Dbl): Dbl = { val d = cloneType - pushCommand(DefPrim(d.defd.id, d.toType, op, Array(this.ref, other.ref), NoLits)) + pushCommand(DefPrim(d.defd.cid, d.toType, op, Array(this.ref, other.ref), NoLits)) d } private def dbl_compop(op: PrimOp, other: Dbl): Bool = { val d = new Bool(dir) - pushCommand(DefPrim(d.defd.id, d.toType, op, Array(this.ref, other.ref), NoLits)) + pushCommand(DefPrim(d.defd.cid, d.toType, op, Array(this.ref, other.ref), NoLits)) d } |
