1
0
rocket-chip/rocket/src/main/scala/util.scala

11 lines
236 B
Scala
Raw Normal View History

package rocket
2011-11-09 23:52:17 +01:00
import Chisel._
object Util
2011-12-09 09:42:43 +01:00
{
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
2011-12-09 09:42:43 +01:00
}