diff options
| author | Aditya Naik | 2024-06-03 19:41:04 -0700 |
|---|---|---|
| committer | Aditya Naik | 2024-06-03 19:41:04 -0700 |
| commit | 52824ce57e9d60fe6ef721cfb073249e654dcf46 (patch) | |
| tree | 1763ea303391b0cf1c0e4e21e7b7d3626f4d64fb /src/main/scala/chisel3/util/Bitwise.scala | |
| parent | a529d0e962cbe6a8f32dcc87d5193df46c0ebc94 (diff) | |
fix stuff in src/
build is failing with a compile error in 3.3.3 due to something in
Aggregate.scala. reduce to smallest form and file a bug report maybe?
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 92ebddb4..4fc4d78c 100644 --- a/src/main/scala/chisel3/util/Bitwise.scala +++ b/src/main/scala/chisel3/util/Bitwise.scala @@ -103,11 +103,11 @@ object Reverse { var res = in var shift = length >> 1 var mask = ((BigInt(1) << length) - 1).asUInt(length.W) - do { + while (shift > 0) do { mask = mask ^ (mask(length - shift - 1, 0) << shift) res = ((res >> shift) & mask) | ((res(length - shift - 1, 0) << shift) & ~mask) shift = shift >> 1 - } while (shift > 0) + } res case _ => val half = (1 << log2Ceil(length)) / 2 |
