magma
magma copied to clipboard
circuit.sequential fails on calls within branches
@m.circuit.sequential
class A:
def __call__(self, i: m.Bit) -> m.Bit:
return i
#Works
@m.circuit.sequential
class B0:
def __init__(self):
self.a0: A = A()
self.a1: A = A()
def __call__(self, i : m.Bit) -> m.Bit:
i0 = self.a0(i)
i1 = self.a1(~i)
if i:
return i0
else:
return i1
#Currently fails
@m.circuit.sequential
class B1:
def __init__(self):
self.a0: A = A()
self.a1: A = A()
def __call__(self, i : m.Bit) -> m.Bit:
if i:
return self.a0(i)
else:
return self.a1(~i)
I have a branch called 'hierarchy' which includes this test in test_sequential.py
Did you push? All tests pass on your branch
Actually never mind I have no problem recreating the issue