1
0

don't use Scala to Chisel implicit conversions outside of rocket

This commit is contained in:
Howard Mao
2016-09-28 16:10:32 -07:00
parent 9910c69c67
commit ab3219cf6e
21 changed files with 36 additions and 26 deletions

View File

@ -135,5 +135,5 @@ object Random
private def round(x: Double): Int =
if (x.toInt.toDouble == x) x.toInt else (x.toInt + 1) & -2
private def partition(value: UInt, slices: Int) =
Seq.tabulate(slices)(i => value < round((i << value.getWidth).toDouble / slices))
Seq.tabulate(slices)(i => value < UInt(round((i << value.getWidth).toDouble / slices)))
}