Groundwork for assoc cache implementation

This commit is contained in:
Henry Cook committed 2012-01-18 17:09:35 -08:00
1 parent 07f184df2f
commit 7e25749581
4 files changed
+31 -17

No files matched your search

+8 -2
View File
@@ -2,8 +2,14 @@ package Top
{
import Chisel._
import Node._;
import scala.math._;
import Node._
import scala.math._
object foldR
{
def apply[T <: Bits](x: Seq[T], f: (T, T) => T): T =
if (x.length == 1) x(0) else f(x(0), foldR(x.slice(1, x.length), f))
}
object log2up
{