Skip to content

Commit c0de7ce

Browse files
committed
[Infra]: generating yosys blif files for run_reg_test/odin_reg_techmap if not exist
Signed-off-by: Seyed Alireza Damghani <[email protected]>
1 parent fdedeb4 commit c0de7ce

File tree

3 files changed

+8
-27
lines changed

3 files changed

+8
-27
lines changed

ODIN_II/verify_odin.sh

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,12 @@ _DRY_RUN="off"
6262
_RANDOM_DRY_RUN="off"
6363
_GENERATE_BLIF="off"
6464
_REGENERATE_BLIF="off"
65-
_FORCE_GENERATE_BLIF="off"
6665
_REGENERATE_EXPECTATION="off"
6766
_GENERATE_EXPECTATION="off"
6867
_CONTINUE="off"
6968
_REPORT="on"
7069
_STATUS_ONLY="off"
7170
_RUN_YOSYS_ARGS=""
72-
_CLEAN_UP="off"
7371

7472
##############################################
7573
# Exit Functions
@@ -202,10 +200,6 @@ function generate_blifs() {
202200
BENCHMARK="$1"
203201
BENCH_NAME=$(echo ${BENCHMARK} | sed 's/.*\(_BLIF\)/\1/g' )
204202

205-
if [ "_${_CLEAN_UP}" == "_on" ]; then
206-
_RUN_YOSYS_ARGS+=" --clean "
207-
fi
208-
209203
if [ _${_GENERATE_BLIF} = "_on" ]; then
210204
echo "Generating missed BLIF files for benchmarks in ${REGRESSION_DIR}/benchmark/_VERILOG/${BENCH_NAME}"
211205
elif [ _${_REGENERATE_BLIF} = "_on" ]; then
@@ -395,7 +389,6 @@ function parse_args() {
395389

396390
;;-c|--clean)
397391
echo "Cleaning temporary run in directory"
398-
_CLEAN_UP="on"
399392
cleanup_temp
400393

401394
;;-f|--force_simulate)
@@ -577,7 +570,7 @@ function populate_arg_from_file() {
577570

578571
;;_circuit_list_add)
579572
# glob the value
580-
_circuit_list_add+=( "${_circuits_dir}"/${_value} )
573+
_circuit_list_add+=( "${_circuits_dir}"/${_value} )
581574

582575
;;_archs_dir)
583576
if [ ! -d "${_value}" ]
@@ -710,12 +703,7 @@ function populate_arg_from_file() {
710703
do
711704
if [ ! -f "${circuit_list_item}" ]
712705
then
713-
if [ "_${_local_techmap_params}" != "_" ]; then
714-
echo "file ${circuit_list_item} not found, will be generating.."
715-
_FORCE_GENERATE_BLIF="on"
716-
else
717-
echo "file ${circuit_list_item} not found, skipping"
718-
fi
706+
echo "file ${circuit_list_item} not found, skipping"
719707
else
720708
_circuit_list+=( "${circuit_list_item}" )
721709
fi
@@ -903,18 +891,6 @@ function sim() {
903891
esac
904892
done
905893

906-
####################################
907-
# generate yosys BLIFs if needed
908-
if [ "_${_techmap}" == "_on" ]; then
909-
# check if blif generting flags are active
910-
if [ "_${_CLEAN_UP}" == "_on" ] || \
911-
[ "_${_GENERATE_BLIF}" == "_on" ] || \
912-
[ "_${_REGENERATE_BLIF}" == "_on" ] || \
913-
[ "_${_FORCE_GENERATE_BLIF}" == "_on" ]; then
914-
generate_blifs "${benchmark_dir/${THIS_DIR}\/}"
915-
fi
916-
fi
917-
918894
##########################################
919895
# setup defaults
920896

@@ -1646,6 +1622,10 @@ function run_suite() {
16461622

16471623
for (( i = 0; i < ${#task_list[@]}; i++ ));
16481624
do
1625+
# check if blif generting flags are active
1626+
if [ "_${_GENERATE_BLIF}" == "_on" ] || [ "_${_REGENERATE_BLIF}" == "_on" ]; then
1627+
generate_blifs "${task_list[$i]}"
1628+
fi
16491629
run_task "${task_list[$i]}"
16501630
TEST_COUNT=$(( TEST_COUNT + 1 ))
16511631
done

run_reg_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def run_odin_test(args, test_name):
290290
odin_reg_script[-1],
291291
"--generate_blif",
292292
# to avoid showing yosys logs
293-
"--show_failure" if args.show_failures else ""
293+
"--show_failure" if args.show_failures else "",
294294
]
295295
subprocess.call(yosys_reg_script, cwd=odin_root)
296296

vtr_flow/scripts/python_libs/vtr/paths.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
odin_exe_path = odin_path / "odin_II"
1414
odin_cfg_path = vtr_flow_path / "misc" / "basic_odin_config_split.xml"
1515
odin_verify_path = odin_path / "verify_odin.sh"
16+
run_yosys_path = odin_path / "run_yosys.sh"
1617
odin_benchmark_path = odin_path / "regression_test" / "benchmark"
1718
odin_output_on_error_path = odin_path / "regression_test" / ".library" / "output_on_error.conf"
1819

0 commit comments

Comments
 (0)