2012-02-26 02:09:26 +01:00
|
|
|
package rocket
|
2011-11-09 23:52:17 +01:00
|
|
|
|
|
|
|
import Chisel._
|
2012-01-14 00:55:56 +01:00
|
|
|
|
2012-10-12 01:48:51 +02:00
|
|
|
object Util
|
2011-12-09 09:42:43 +01:00
|
|
|
{
|
2012-10-12 01:48:51 +02: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
|
|
|
}
|