Implement client-side DMA controller

This commit is contained in:
Howard Mao
2015-12-16 21:24:24 -08:00
parent 01a3447989
commit 304d8b814a
4 changed files with 362 additions and 1 deletions
+6
View File
@@ -21,6 +21,12 @@ object Util {
implicit def booleanToIntConv(x: Boolean) = new AnyRef {
def toInt: Int = if (x) 1 else 0
}
def minUInt(values: Seq[UInt]): UInt =
values.reduce((a, b) => Mux(a < b, a, b))
def minUInt(first: UInt, rest: UInt*): UInt =
minUInt(first +: rest.toSeq)
}
import Util._