working with some errors yet

This commit is contained in:
Jordi Baylina
2018-12-13 19:53:32 +01:00
parent 38fc4b7396
commit ccaa7ff23b
11 changed files with 24599 additions and 150 deletions

View File

@@ -55,6 +55,7 @@ a parent with a sibling != 0.
*/
template SMTLevIns(nLevels) {
signal input enabled;
signal input siblings[nLevels];
signal output levIns[nLevels];
signal done[nLevels-1]; // Indicates if the insLevel has aready been detecetd.
@@ -67,7 +68,7 @@ template SMTLevIns(nLevels) {
}
// The last level must always have a sibling of 0. If not, then it cannot be inserted.
isZero[nLevels-2].out === 1;
(isZero[nLevels-2].out - 1) * enabled === 0;
levIns[nLevels-1] <== (1-isZero[nLevels-2].out);
done[nLevels-2] <== levIns[nLevels-1];