forked from limbo018/OpenMPL
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgdb.sh
203 lines (182 loc) · 5.17 KB
/
gdb.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
#########################################################################
# File Name: gdb.sh
# Author: Yibo Lin
# mail: [email protected]
# Created Time: Sat 23 May 2015 05:22:02 PM CDT
#########################################################################
#!/bin/bash
color_num=3
simplify_level=3
thread_num=1
algo=LP # BACKTRACK or ILP or LP or SDP or MIS
#benchmark="output_4x4-flat.gds"
#benchmark="Via2_local_precolor.gds"
#benchmark="via2_local_precolor.gds"
#benchmark="via2.gds"
benchmark="sim_s2.gds"
#benchmark="mpl_sim_s3_c${color_num}_algo1.gds" # output from mpl
#benchmark="Via1_clip_300x300.gds"
if [[ $benchmark == output_* ]]; then
benchmark_dir="/home/local/eda03/shared_benchmarks/imec_7nm/dpt_array"
elif [[ $benchmark == Via2_local_precolor* ]]; then
benchmark_dir="/home/local/eda03/shared_benchmarks/imec_7nm"
elif [[ $benchmark == via2_local_precolor* ]]; then
benchmark_dir="./bin/bench"
elif [[ $benchmark == via2.gds ]]; then
benchmark_dir="/home/local/eda03/shared_benchmarks"
elif [[ $benchmark == sim_* ]]; then
benchmark_dir="${BENCHMARKS_DIR}/ISCAS_sim"
elif [[ $benchmark == total_* ]]; then
benchmark_dir="${BENCHMARKS_DIR}/ISCAS_total"
elif [[ $benchmark == mpl_* ]]; then
benchmark_dir="${BENCHMARKS_DIR}/mpl_output/ISCAS_sim"
elif [[ $benchmark == Via1* ]]; then
benchmark_dir="/home/local/eda03/shared_benchmarks"
fi
#output="${benchmark%.*}-c${color_num}-out.gds"
output=""
if [[ $benchmark == output_* ]]; then
# this parameter works for output_1x1.gds
gdb \
-ex "source ${LIBRARIES_DIR}/gdb_container.sh" \
--args ./bin/SimpleMPL \
-shape "RECTANGLE" \
-in "${benchmark_dir}/${benchmark}" \
-out "${output}" \
-uncolor_layer 208 \
-uncolor_layer 209 \
-uncolor_layer 210 \
-uncolor_layer 211 \
-uncolor_layer 216 \
-path_layer 207 \
-color_num ${color_num} \
-simplify_level ${simplify_level} \
-thread_num ${thread_num} \
-algo ${algo} #\
# -verbose
elif [[ $benchmark == "via2.gds" ]]; then
gdb \
-ex "source ${LIBRARIES_DIR}/gdb_container.sh" \
--args ./bin/SimpleMPL \
-shape "RECTANGLE" \
-in "${benchmark_dir}/${benchmark}" \
-out "${output}" \
-uncolor_layer 208 \
-uncolor_layer 209 \
-uncolor_layer 210 \
-uncolor_layer 211 \
-uncolor_layer 216 \
-path_layer 207 \
-color_num ${color_num} \
-simplify_level ${simplify_level} \
-thread_num ${thread_num} \
-algo ${algo} #\
# -verbose
elif [[ $benchmark == Via2_local_precolor* ]]; then
# this parameter works for Via2_local_precolor.gds
gdb \
-ex "source ${LIBRARIES_DIR}/gdb_container.sh" \
--args ./bin/SimpleMPL \
-shape "RECTANGLE" \
-in "${benchmark_dir}/${benchmark}" \
-out "${output}" \
-uncolor_layer 100 \
-precolor_layer 201 \
-precolor_layer 202 \
-precolor_layer 203 \
-coloring_distance 130 \
-color_num ${color_num} \
-simplify_level ${simplify_level} \
-thread_num ${thread_num} \
-algo ${algo} \
-verbose
elif [[ $benchmark == via2_local_precolor* ]]; then
# this parameter works for via2_local_precolor.gds
gdb \
-ex "source ${LIBRARIES_DIR}/gdb_container.sh" \
--args ./bin/SimpleMPL \
-shape "RECTANGLE" \
-in "${benchmark_dir}/${benchmark}" \
-out "${output}" \
-uncolor_layer 100 \
-precolor_layer 201 \
-precolor_layer 202 \
-precolor_layer 203 \
-coloring_distance 300 \
-color_num ${color_num} \
-simplify_level ${simplify_level} \
-thread_num ${thread_num} \
-algo ${algo} \
-verbose
elif [[ $benchmark == sim_* ]]; then
# this parameter works for sim_c1
if [[ $color_num == 3 ]]; then
coloring_distance=120
else
coloring_distance=160
fi
gdb \
-ex "source ${LIBRARIES_DIR}/gdb_container.sh" \
--args \
./bin/SimpleMPL \
-shape "POLYGON" \
-in "${benchmark_dir}/${benchmark}" \
-out "${output}" \
-uncolor_layer 1 \
-uncolor_layer 101 \
-coloring_distance ${coloring_distance} \
-color_num ${color_num} \
-simplify_level ${simplify_level} \
-thread_num ${thread_num} \
-algo ${algo} \
-dbg_comp_id 130
#-verbose
elif [[ $benchmark == mpl_* ]]; then
# this parameter works for mpl_sim_c9
if [[ $color_num == 3 ]]; then
coloring_distance=120
elif [[ $color_num == 4 ]]; then
coloring_distance=160
fi
gdb \
-ex "source ${LIBRARIES_DIR}/gdb_container.sh" \
--args \
./bin/SimpleMPL \
-shape "POLYGON" \
-in "${benchmark_dir}/${benchmark}" \
-out "${output}" \
-precolor_layer 3 \
-precolor_layer 4 \
-precolor_layer 5 \
-precolor_layer 6 \
-uncolor_layer 0 \
-coloring_distance ${coloring_distance} \
-color_num ${color_num} \
-simplify_level ${simplify_level} \
-thread_num ${thread_num} \
-algo ${algo} \
-dbg_comp_id 1686000 \
-verbose
elif [[ $benchmark == Via1* ]]; then
# this parameter works for mpl_sim_c9
if [[ $color_num == 3 ]]; then
coloring_distance=64
elif [[ $color_num == 4 ]]; then
coloring_distance=90
fi
gdb \
-ex "source ${LIBRARIES_DIR}/gdb_container.sh" \
--args ./bin/SimpleMPL \
-shape "RECTANGLE" \
-in "${benchmark_dir}/${benchmark}" \
-out "${output}" \
-uncolor_layer 71 \
-uncolor_layer 72 \
-uncolor_layer 73 \
-coloring_distance ${coloring_distance} \
-color_num ${color_num} \
-simplify_level ${simplify_level} \
-thread_num ${thread_num} \
-algo ${algo} #\
# -verbose
fi