diff options
| author | Jim Lawson | 2016-07-25 13:37:53 -0700 |
|---|---|---|
| committer | Jim Lawson | 2016-07-25 13:37:53 -0700 |
| commit | 3624751e2e63ba9f107c795529edfe48cf8340b2 (patch) | |
| tree | 951deec27b8a75d9d9c0eec0aee6fa08f80f9ae0 /src/main/scala/chisel3/util/OneHot.scala | |
| parent | 50518f43cbd9c783633714a26ecdb0f2f18a1142 (diff) | |
| parent | 54cd58cbb435170dd2ed67dafe1cb1d769a799e8 (diff) | |
Merge branch 'master' into sdtwigg_connectwrap_renamechisel3
Diffstat (limited to 'src/main/scala/chisel3/util/OneHot.scala')
| -rw-r--r-- | src/main/scala/chisel3/util/OneHot.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/scala/chisel3/util/OneHot.scala b/src/main/scala/chisel3/util/OneHot.scala index c1f94ba6..49661115 100644 --- a/src/main/scala/chisel3/util/OneHot.scala +++ b/src/main/scala/chisel3/util/OneHot.scala @@ -10,7 +10,7 @@ import chisel3._ /** Converts from One Hot Encoding to a UInt indicating which bit is active * This is the inverse of [[Chisel.UIntToOH UIntToOH]]*/ object OHToUInt { - def apply(in: Seq[Bool]): UInt = apply(Vec(in)) + def apply(in: Seq[Bool]): UInt = apply(Cat(in.reverse), in.size) def apply(in: Vec[Bool]): UInt = apply(in.toBits, in.size) def apply(in: Bits): UInt = apply(in, in.getWidth) |
