summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/util/OneHot.scala
AgeCommit message (Collapse)Author
2022-01-10Apply scalafmtJack Koenig
Command: sbt scalafmtAll
2020-10-01Move Chisel3 to SPDX license conventions (#1604)Chick Markley
Change source and other relevant files to use SPDX license LICENSE file moved from src/ to ./ Changed license file to refer to this per recommendation using_spdx_license_list_short_identifiers WARNING: Tests fail with as of yet undiagnosed error ``` [error] Failed: Total 691, Failed 19, Errors 0, Passed 672, Ignored 15 [error] Failed tests: [error] chiselTests.QueueSpec [error] examples.VendingMachineGeneratorSpec [error] chiselTests.HarnessSpec [error] chiselTests.ConnectSpec [error] chiselTests.aop.SelectSpec [error] chiselTests.PopCountSpec [error] chiselTests.CloneModuleSpec [error] (Test / test) sbt.TestsFailedException: Tests unsuccessful [error] Total time: 379 s (06:19), completed Sep 30, 2020 12:38:17 AM sbt:chisel3> ```
2020-08-06Update OneHot.scala (#1539)Leigang Kou
comment fix only.
2019-02-19ScalaDoc for OneHot (#1016)Martin Schoeberl
2018-12-04Add asBools, deprecate toBoolsJack Koenig
2018-06-18Fixed UIntToOH(x, 1) invocation with x.width == 0 (#778)Wesley W. Terpstra
2018-05-24Fix UIntToOH for output widths larger than 2^(input width) (#823)Andrew Waterman
* Add test for UIntToOH * Pad UIntToOH inputs to support oversized output widthds * Optimize Bits.pad in case of known widths * Add missing import and fix test in OneHotMuxSpec
2017-03-08Improve UIntToOH behavior on incorrect inputs; avoid log2UpAndrew Waterman
The old implementation failed to check for width <= -2, and did the wrong thing when -1 was explicitly passed. Splitting into two methods avoids the latter issue. log2Ceil's argument might be 1, so employ a max operator.
2017-03-08In OHToUInt, use log2Ceil instead of log2UpAndrew Waterman
Since the argument is at least 2, this change has no semantic effect.
2016-11-21Restyle a lot of test code, mainly with regexducky
2016-09-21Improved scaladoc in utils and friendsducky
2016-07-31Fix two deprecation warningsAndrew Waterman
2016-07-07Avoid needlessly creating VecsAndrew Waterman
2016-06-20Rename "package", "import", and explicit references to "chisel3".Jim Lawson
2016-06-20Rename chisel3 package.Jim Lawson