diff options
| author | Andrew Waterman | 2015-07-16 16:49:15 -0700 |
|---|---|---|
| committer | Andrew Waterman | 2015-07-16 16:57:56 -0700 |
| commit | f071419cbc9bdaca5ca09a032830c47ca90357e3 (patch) | |
| tree | 2852156941efb9f0863f49425cf3f680bc3e7f6b /src/main/scala/utils.scala | |
| parent | 5bc6b17eec89935e8f75e0160d5da78b222aea7f (diff) | |
Add OHToUInt, PriorityEncoder
Diffstat (limited to 'src/main/scala/utils.scala')
| -rw-r--r-- | src/main/scala/utils.scala | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/main/scala/utils.scala b/src/main/scala/utils.scala index 804ed12e..0fb275d6 100644 --- a/src/main/scala/utils.scala +++ b/src/main/scala/utils.scala @@ -29,16 +29,6 @@ object isPow2 def apply(in: Int): Boolean = in > 0 && ((in & (in-1)) == 0) } -object Log2 { - def apply(x: UInt, width: Int): UInt = { - if (width < 2) UInt(0) - else Mux(x(width-1), UInt(width-1), apply(x, width-1)) - } - - // TODO: infer the width in the backend - def apply(x: UInt): UInt = apply(x, x.getWidth) -} - object FillInterleaved { def apply(n: Int, in: Bits): Bits = apply(n, in.toBools) |
