From 4e331f05255ecf43fd16ceaa07a11fb6cfe0f55e Mon Sep 17 00:00:00 2001 From: Vojta Mrazek Date: Mon, 8 Apr 2024 13:48:25 +0200 Subject: [PATCH] popcount with variable sizes --- ariths_gen/multi_bit_circuits/others/popcount_compare.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ariths_gen/multi_bit_circuits/others/popcount_compare.py b/ariths_gen/multi_bit_circuits/others/popcount_compare.py index 1f2095c..3f26875 100644 --- a/ariths_gen/multi_bit_circuits/others/popcount_compare.py +++ b/ariths_gen/multi_bit_circuits/others/popcount_compare.py @@ -73,9 +73,9 @@ class PopCountCompare(GeneralCircuit): prefix=f"{prefix}_popcount2", inner_component=True)).out - N = max(p1.N, p2.N) - p1.bus_extend(N) - p2.bus_extend(N) + #N = max(p1.N, p2.N) + #p1.bus_extend(N) + #p2.bus_extend(N) red = self.add_component(UnsignedCompareGTE(p1, p2, prefix=f"{prefix}_cmp", inner_component = True)) self.out.connect_bus(red.out)