popcount with variable sizes
This commit is contained in:
parent
211dd49fb5
commit
4e331f0525
@ -73,9 +73,9 @@ class PopCountCompare(GeneralCircuit):
|
|||||||
prefix=f"{prefix}_popcount2",
|
prefix=f"{prefix}_popcount2",
|
||||||
inner_component=True)).out
|
inner_component=True)).out
|
||||||
|
|
||||||
N = max(p1.N, p2.N)
|
#N = max(p1.N, p2.N)
|
||||||
p1.bus_extend(N)
|
#p1.bus_extend(N)
|
||||||
p2.bus_extend(N)
|
#p2.bus_extend(N)
|
||||||
|
|
||||||
red = self.add_component(UnsignedCompareGTE(p1, p2, prefix=f"{prefix}_cmp", inner_component = True))
|
red = self.add_component(UnsignedCompareGTE(p1, p2, prefix=f"{prefix}_cmp", inner_component = True))
|
||||||
self.out.connect_bus(red.out)
|
self.out.connect_bus(red.out)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user