From 52824ce57e9d60fe6ef721cfb073249e654dcf46 Mon Sep 17 00:00:00 2001 From: Aditya Naik Date: Mon, 3 Jun 2024 19:41:04 -0700 Subject: 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? --- src/main/scala/chisel3/util/Bitwise.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/scala/chisel3/util/Bitwise.scala') 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 -- cgit v1.2.3