-
Notifications
You must be signed in to change notification settings - Fork 0
/
converter_check.sh
101 lines (88 loc) · 3.33 KB
/
converter_check.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
function compare {
r1=$(wtk-firealarm $1 $3 $4)
r2=$(wtk-firealarm $2 $3 $4)
# echo ${r1:7:4} ${r2:7:4}
#echo -e '\n'
if [[ "${r1:7:4}" != "${r2:7:4}" ]]; then
echo -e "FAIL!" $1 $3 $4
fi
}
./IR120.sh example/add4/add4.rel a.rel
./IR120.sh example/add4/add4_anon.rel b.rel
./IR120.sh example/add4/add4_func.rel c.rel
./IR120.sh example/add4/add4_check.rel d.rel
for ins in example/two-bit/*.ins
do
for wit in example/two-bit/*.wit
do
compare example/add4/add4.rel a.rel $ins $wit
compare example/add4/add4_anon.rel b.rel $ins $wit
compare example/add4/add4_func.rel c.rel $ins $wit
compare example/add4/add4_check.rel d.rel $ins $wit
done
done
./IR120.sh example/add4_or_mul4/add4_or_mul4.rel a.rel
./IR120.sh example/add4_or_mul4/add4_or_mul4_anon.rel b.rel
./IR120.sh example/add4_or_mul4/add4_or_mul4_input.rel c.rel
./IR120.sh example/add4_or_mul4/add4_or_mul4_input_anon.rel d.rel
./IR120.sh example/unbalanced2.rel e.rel
for ins in example/two-bit/*.ins
do
for wit in example/three-bit/*wit
do
compare example/add4_or_mul4/add4_or_mul4.rel a.rel $ins $wit
compare example/add4_or_mul4/add4_or_mul4_anon.rel b.rel $ins $wit
compare example/add4_or_mul4/add4_or_mul4_input.rel c.rel $ins $wit
compare example/add4_or_mul4/add4_or_mul4_input_anon.rel d.rel $ins $wit
compare example/unbalanced2.rel e.rel $ins $wit
done
done
./IR120.sh example/unbalanced.rel a.rel
for ins in example/three-bit/*.ins
do
for wit in example/three-bit/*wit
do
compare example/unbalanced.rel a.rel $ins $wit
done
done
./IR120.sh example_arithmetic/add4/add4.rel a.rel
./IR120.sh example_arithmetic/add4/add4_anon.rel b.rel
./IR120.sh example_arithmetic/add4/add4_func.rel c.rel
./IR120.sh example_arithmetic/add4/add4_check.rel d.rel
for ins in example_arithmetic/add4/*.ins
do
for wit in example_arithmetic/add4/*.wit
do
compare example_arithmetic/add4/add4.rel a.rel $ins $wit
compare example_arithmetic/add4/add4_anon.rel b.rel $ins $wit
compare example_arithmetic/add4/add4_func.rel c.rel $ins $wit
compare example_arithmetic/add4/add4_check.rel d.rel $ins $wit
done
done
./IR120.sh example_arithmetic/add4_or_mul4/add4_or_mul4.rel a.rel
./IR120.sh example_arithmetic/add4_or_mul4/add4_or_mul4_anon.rel b.rel
./IR120.sh example_arithmetic/add4_or_mul4/add4_or_mul4_input.rel c.rel
./IR120.sh example_arithmetic/add4_or_mul4/add4_or_mul4_input_anon.rel d.rel
for ins in example_arithmetic/add4_or_mul4/*.ins
do
for wit in example_arithmetic/add4_or_mul4/*.wit
do
compare example_arithmetic/add4_or_mul4/add4_or_mul4.rel a.rel $ins $wit
compare example_arithmetic/add4_or_mul4/add4_or_mul4_anon.rel b.rel $ins $wit
compare example_arithmetic/add4_or_mul4/add4_or_mul4_input.rel c.rel $ins $wit
compare example_arithmetic/add4_or_mul4/add4_or_mul4_input_anon.rel d.rel $ins $wit
done
done
./IR120.sh example_arithmetic/sum_test/sum_test.rel a.rel
compare example_arithmetic/sum_test/sum_test.rel a.rel example_arithmetic/sum_test/sum_test.ins example_arithmetic/sum_test/sum_test.wit
for n in 10
do
./IR120.sh example/sha256x$n.rel a.rel
compare example/sha256x$n.rel a.rel example/sha.ins example/sha.wit
done
for n in 5 10 100
do
./IR120.sh example_arithmetic/matprod$n.rel a.rel
compare example_arithmetic/matprod$n.rel a.rel example_arithmetic/matprod$n.ins example_arithmetic/matprod$n.wit
done
rm a.rel b.rel c.rel d.rel e.rel