diff options
| author | Jack Koenig | 2018-12-04 13:53:36 -0800 |
|---|---|---|
| committer | GitHub | 2018-12-04 13:53:36 -0800 |
| commit | 83f2a65a3ab1d21258883c0b113406ef9900a57f (patch) | |
| tree | c21edf9bc9c5f2f42ec5716a829145024bb82862 /src/main/scala/chisel3/util/Bitwise.scala | |
| parent | ab951049c2c60402e2318ba863520d4a16c8288d (diff) | |
| parent | 3db21bd8e5a32c29efa55494d180dac4d22589e5 (diff) | |
Merge pull request #950 from freechipsproject/as-bools
asBools, asBool, and chained apply on asBools
Diffstat (limited to 'src/main/scala/chisel3/util/Bitwise.scala')
| -rw-r--r-- | src/main/scala/chisel3/util/Bitwise.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/chisel3/util/Bitwise.scala b/src/main/scala/chisel3/util/Bitwise.scala index 387fd109..956b8262 100644 --- a/src/main/scala/chisel3/util/Bitwise.scala +++ b/src/main/scala/chisel3/util/Bitwise.scala @@ -24,7 +24,7 @@ object FillInterleaved { * * Output data-equivalent to in(size(in)-1) (n times) ## ... ## in(1) (n times) ## in(0) (n times) */ - def apply(n: Int, in: UInt): UInt = apply(n, in.toBools) + def apply(n: Int, in: UInt): UInt = apply(n, in.asBools) /** Creates n repetitions of each bit of x in order. * @@ -69,7 +69,7 @@ object Fill { case 0 => UInt(0.W) case 1 => x case _ if x.isWidthKnown && x.getWidth == 1 => - Mux(x.toBool, ((BigInt(1) << n) - 1).asUInt(n.W), 0.U(n.W)) + Mux(x.asBool, ((BigInt(1) << n) - 1).asUInt(n.W), 0.U(n.W)) case _ => val nBits = log2Ceil(n + 1) val p2 = Array.ofDim[UInt](nBits) |
