forked from Centre-for-Hardware-Security/resynthesis_attack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.sh
More file actions
51 lines (41 loc) · 1.34 KB
/
settings.sh
File metadata and controls
51 lines (41 loc) · 1.34 KB
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
# NOTE points to path where this script resides; https://stackoverflow.com/a/246128
pwd__="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
## NOTE/TODO these parameters are to be revised to match the setup at your end
# local link to abc binary
# https://github.com/berkeley-abc/abc.git
abc=/data/projects/abc/abc
# local link to SCOPE folder
# https://github.com/alaql89/SCOPE
scope_dir=/data/projects/SCOPE
# local link to convert.sh
convert=$pwd__/abc/convert.sh
# local link to genus_synth.pl and options/parameters
synth=$pwd__/genus_synth.pl
synth_settings="-ldd -crl=5 -auto -dux"
# lib file
#lib=/home/jk176/old_home/work/Nangate/NangateOpenCellLibrary_typical.lib
lib=/data/projects/resynth_attack/data/NangateOpenCellLibrary_typical.lib
# NOTE only strings/names, not full paths; this is on purpose
bench_in=design_in.bench
verilog_out=design_in.b2v.v
verilog_in=design_in.v
bench_out=design_in.v2b.bench
lib_in=library.lib
# NOTE scale/resolution for floating point computation
scale_fp=4
## sanity checks
#
if ! [[ -e $abc ]]; then
echo "'abc' binary does not exist; check the provided path: \"$abc\"."
exit 1
fi
#
if ! [[ -d $scope_dir ]]; then
echo "'SCOPE' directory does not exist; check the provided path: \"$scope_dir\"."
exit 1
fi
#
if ! [[ -e $lib ]]; then
echo "Library files does not exist; check the provided path: \"$lib\"."
exit 1
fi