1
0
rocket-chip/rocket/src/main/scala/util.scala
2012-10-16 16:32:35 -07:00

11 lines
236 B
Scala

package rocket
import Chisel._
object Util
{
implicit def intToUFix(x: Int): UFix = UFix(x)
implicit def intToBoolean(x: Int): Boolean = if (x != 0) true else false
implicit def booleanToInt(x: Boolean): Int = if (x) 1 else 0
}