diff options
| author | Andrew Waterman | 2016-07-06 23:01:42 -0700 |
|---|---|---|
| committer | Andrew Waterman | 2016-07-07 00:37:01 -0700 |
| commit | bae5cbbbf64782ffe7a5a06981d94655bfc76089 (patch) | |
| tree | b0a43ebcfa493e8e15d28f60644989ccf6c73475 /src/main/scala/chisel3/util/CircuitMath.scala | |
| parent | fb39f7dc372b5836f02d8d7964f5fcc6a38f8747 (diff) | |
Correct erroneous Log2 documentation
Diffstat (limited to 'src/main/scala/chisel3/util/CircuitMath.scala')
| -rw-r--r-- | src/main/scala/chisel3/util/CircuitMath.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/scala/chisel3/util/CircuitMath.scala b/src/main/scala/chisel3/util/CircuitMath.scala index 1174c71c..b5be03bf 100644 --- a/src/main/scala/chisel3/util/CircuitMath.scala +++ b/src/main/scala/chisel3/util/CircuitMath.scala @@ -7,11 +7,11 @@ package chisel3.util import chisel3._ -/** Compute Log2 with truncation of a UInt in hardware using a Mux Tree - * An alternative interpretation is it computes the minimum number of bits needed to represent x +/** Compute the base-2 integer logarithm of a UInt * @example * {{{ data_out := Log2(data_in) }}} - * @note Truncation is used so Log2(UInt(12412)) = 13*/ + * @note The result is truncated, so e.g. Log2(UInt(13)) = 3 + */ object Log2 { /** Compute the Log2 on the least significant n bits of x */ def apply(x: Bits, width: Int): UInt = { |
