I've been trying to verify equivalence property between two circuits in Chalmers Lava. I have declared a type bit:
type Bit = Signal Bool
And I have two circuits each has a list of bits as input and a tuple of lists of bits, and a function that checks their equivalence:
circuit1:: [Bit] ->([Bit],[Bit])
circuit2:: [Bit] ->([Bit],[Bit])
propEquiv input = ok
where
out1 = circuit1 input
out2 = circuit2 input
ok = out1 <==> out2
These two circuits take inputs as lists of 64 elements. I was able to simulate them with one input using simulate, ans simulate them with multiple using simulateSeq, but for the hole domain i wasn't able and I got this error:
<interactive>:7:20:
No instance for (Finite [Bit]) arising from a use of `domain'
In the second argument of `simulateSeq', namely `domain'
In the expression: simulateSeq ipSpec domain
In an equation for `it': it = simulateSeq ipSpec domain
(in line 7 i have the type declaration)
Also for the propEquiv, I can simulate it, but I couldn't verify it using satzoo, and i got this error:
*Main> satzoo propEquiv
<interactive>:9:1:
No instance for (Fresh [Bit]) arising from a use of `satzoo'
In the expression: satzoo propEquiv
In an equation for `it': it = satzoo propEquiv
*Main>
I counldn't understand both of them neither find anything when searching on the web, can someone help me with this? i tried to define the circuits with 64 elemnts in stand of a list , but it didn't work.
Regards.