1
0

Groundwork for assoc cache implementation

This commit is contained in:
Henry Cook
2012-01-13 15:55:56 -08:00
parent 07f184df2f
commit 7e25749581
4 changed files with 31 additions and 17 deletions

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
{