8
8
INPUT=$@
9
9
10
10
BASE_DIR=" regression_test/benchmark"
11
- TEST_DIR_LIST=$( find regression_test/benchmark -mindepth 1 -maxdepth 1 -type d | cut -d ' /' -f 3 | tr ' \n' ' ' )
11
+ TEST_DIR_LIST=$( find regression_test/benchmark -mindepth 1 -maxdepth 1 -type d | cut -d ' /' -f 3 | tr ' \n' ' ' )
12
12
13
13
# include more generic names here for better vector generation
14
14
HOLD_LOW_RESET=" -L reset rst"
@@ -58,7 +58,7 @@ function help() {
58
58
printf "
59
59
Called program with $INPUT
60
60
61
- Usage: ./verify_odin
61
+ Usage: ./verify_odin
62
62
--test [test name] * test name is one of ( ${TEST_DIR_LIST} full_suite vtr_basic vtr_strong pre_commit )
63
63
--generate_bench * generate input and output vector for test
64
64
--generate_output * generate output vector for test given its input vector
@@ -112,13 +112,13 @@ function init_temp() {
112
112
new_run=regression_test/${RUN_NAME}
113
113
echo " running benchmark @${new_run} "
114
114
mkdir -p ${new_run}
115
- unlink regression_test/latest
115
+ unlink regression_test/latest
116
116
ln -s ${RUN_NAME} regression_test/latest
117
117
}
118
118
119
119
function cleanup_temp() {
120
120
for runs in regression_test/run*
121
- do
121
+ do
122
122
rm -Rf ${runs}
123
123
unlink regression_test/latest || /bin/true
124
124
done
@@ -187,9 +187,9 @@ function sim() {
187
187
shift
188
188
189
189
while [[ " $# " > 0 ]]
190
- do
190
+ do
191
191
case $1 in
192
- --custom_args_file)
192
+ --custom_args_file)
193
193
with_custom_args=1
194
194
;;
195
195
@@ -227,7 +227,7 @@ function sim() {
227
227
228
228
* )
229
229
echo " Unknown internal parameter passed: $1 "
230
- config_help
230
+ config_help
231
231
ctrl_c
232
232
;;
233
233
esac
@@ -264,8 +264,8 @@ function sim() {
264
264
${RUN_WITH_VALGRIND} "
265
265
266
266
odin_command=" ${DEFAULT_CMD_PARAM}
267
- $( cat ${dir} /odin.args | tr ' \n' ' ' )
268
- -o ${blif_file}
267
+ $( cat ${dir} /odin.args | tr ' \n' ' ' )
268
+ -o ${blif_file}
269
269
-sim_dir ${DIR} "
270
270
271
271
echo $( echo " ${wrapper_odin_command} ${odin_command} " | tr ' \n' ' ' | tr -s ' ' ) > ${DIR} /odin_param
@@ -294,25 +294,27 @@ function sim() {
294
294
295
295
for arches in ${arch_list}
296
296
do
297
-
298
- arch_cmd=" "
299
- if [ -e ${arches} ]
300
- then
301
- arch_cmd=" -a ${arches} "
302
- fi
303
-
304
297
arch_basename=${arches% .xml}
305
298
arch_name=${arch_basename##*/ }
306
299
307
300
TEST_FULL_REF=" ${bench_type} /${test_name} /${arch_name} "
308
-
309
301
DIR=" ${new_run} /${TEST_FULL_REF} "
302
+
310
303
blif_file=" ${DIR} /odin.blif"
311
304
312
305
313
306
# build commands
314
307
mkdir -p $DIR
315
308
309
+ arch_cmd=" "
310
+ if [ -e ${arches} ]
311
+ then
312
+ tiles_cmd=" ../vtr_flow/scripts/add_tiles.py"
313
+ arch_file=" ${arch_name} .xml"
314
+ ${tiles_cmd} --arch_xml ${arches} > ${DIR} /${arch_name} .xml
315
+ arch_cmd=" -a ${DIR} /${arch_name} .xml"
316
+ fi
317
+
316
318
wrapper_synthesis_command=" ./wrapper_odin.sh
317
319
--log_file ${DIR} /synthesis.log
318
320
--test_name ${TEST_FULL_REF}
@@ -357,7 +359,7 @@ function sim() {
357
359
if [ " _$REGENERATE_OUTPUT " != " _1" ] && [ -e ${output_vector_file} ]; then
358
360
simulation_command=" ${simulation_command} -T ${output_vector_file} "
359
361
fi
360
-
362
+
361
363
else
362
364
simulation_command=" ${simulation_command} ${GENERATE_VECTOR_COUNT} "
363
365
@@ -382,20 +384,20 @@ function sim() {
382
384
fi
383
385
384
386
fi
385
-
387
+
386
388
387
389
}
388
390
389
391
function parse_args() {
390
392
while [[ " $# " > 0 ]]
391
- do
393
+ do
392
394
case $1 in
393
395
-h|--help)
394
396
help
395
397
exit_program
396
398
;;
397
399
398
- --generate_output)
400
+ --generate_output)
399
401
if [ $REGENERATE_BENCH != " 0" ] || [ $REGENERATE_OUTPUT != " 0" ]
400
402
then
401
403
echo " can only specify one of --generate_output or --generate_bench"
@@ -406,7 +408,7 @@ function parse_args() {
406
408
echo " regenerating output vector for test given predefined input"
407
409
;;
408
410
409
- --generate_bench)
411
+ --generate_bench)
410
412
if [ $REGENERATE_BENCH != " 0" ] || [ $REGENERATE_OUTPUT != " 0" ]
411
413
then
412
414
echo " can only specify one of --generate_output or --generate_bench"
@@ -417,7 +419,7 @@ function parse_args() {
417
419
echo " regenerating input and output vector for test"
418
420
;;
419
421
420
- --limit_ressource)
422
+ --limit_ressource)
421
423
USING_LOW_RESSOURCE=" --limit_ressource"
422
424
echo " limiting ressources for benchmark, this can help with small hardware"
423
425
;;
@@ -457,13 +459,13 @@ function parse_args() {
457
459
shift
458
460
;;
459
461
460
- * )
462
+ * )
461
463
echo " Unknown parameter passed: $1 "
462
- help
464
+ help
463
465
ctrl_c
464
466
;;
465
- esac
466
- shift
467
+ esac
468
+ shift
467
469
done
468
470
}
469
471
0 commit comments