Don't unbox BigInt to Double

This commit is contained in:
Edward Wang
2017-07-21 11:03:34 -07:00
committed by edwardcwang
parent bb2783994a
commit 8beb8b3f6f

View File

@@ -51,8 +51,8 @@ class Macro(srcMacro: SRAMMacro) {
val extraPorts = srcMacro.extraPorts map { p =>
assert(p.portType == Constant) // TODO: release it?
val name = p.name
val width = BigInt(p.width.asInstanceOf[Double].toLong)
val value = BigInt(p.value.asInstanceOf[Double].toLong)
val width = BigInt(p.width.toLong)
val value = BigInt(p.value.toLong)
(name -> UIntLiteral(value, IntWidth(width)))
}