Merge pull request #391 from xtofalex/xtof_fixes

Typo fixes, detail error message in case of exception and message formatting in scripts
This commit is contained in:
ganeshgore 2021-10-18 11:12:07 -06:00 committed by GitHub
commit 36f847042d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 10 deletions

View File

@ -21,7 +21,7 @@ if [ -z $PYTHON_EXEC ]; then export PYTHON_EXEC="python3"; fi
# inside current OpendFPGA folder
check_execution_path (){
if [[ $1 != *"${OPENFPGA_PATH}"* ]]; then
echo -e "\e[33mCommand is not executed from configured OPNEFPGA directory\e[0m"
echo -e "\e[33mCommand is not executed from configured OPENFPGA directory\e[0m"
fi
}

View File

@ -271,7 +271,7 @@ def main():
if (args.fpga_flow == "vpr_blif"):
collect_files_for_vpr()
logger.info("Runing OpenFPGA Shell Engine ")
logger.info("Running OpenFPGA Shell Engine ")
run_openfpga_shell()
if args.end_flow_with_test:
run_netlists_verification()
@ -304,7 +304,7 @@ def check_required_file():
}
for filename, filepath in files_dict.items():
if not os.path.isfile(filepath):
clean_up_and_exit("Not able to locate deafult file " + filename)
clean_up_and_exit("Not able to locate default file " + filename)
def read_script_config():
@ -347,7 +347,7 @@ def validate_command_line_arguments():
- Activity file
- Base verilog file
'''
logger.info("Validating commnad line arguments")
logger.info("Validating command line arguments")
if args.debug:
logger.info("Setting loggger in debug mode")
@ -363,19 +363,19 @@ def validate_command_line_arguments():
dependent = dependent.split(",")
for eachdep in dependent:
if not any([getattr(args, i, 0) for i in eachdep.split("|")]):
clean_up_and_exit("'%s' argument depends on (%s) argumets" %
clean_up_and_exit("'%s' argument depends on (%s) arguments" %
(eacharg, ", ".join(dependent).replace("|", " or ")))
# Check if architecrue files exists
args.arch_file = os.path.abspath(args.arch_file)
if not os.path.isfile(args.arch_file):
clean_up_and_exit(
"VPR architecture file not found. -%s",
"VPR architecture file not found. -%s"%
args.arch_file)
args.openfpga_arch_file = os.path.abspath(args.openfpga_arch_file)
if not os.path.isfile(args.openfpga_arch_file):
clean_up_and_exit(
"OpenFPGA architecture file not found. -%s",
"OpenFPGA architecture file not found. -%s"%
args.openfpga_arch_file)
# Filter provided benchmark files
@ -389,14 +389,14 @@ def validate_command_line_arguments():
for everyfile in glob.glob(args.benchmark_files[index]):
if not os.path.isfile(everyfile):
clean_up_and_exit(
"Failed to copy benchmark file-%s", args.arch_file)
"Failed to copy benchmark file -%s" % args.arch_file)
# Filter provided powertech files
if args.power_tech:
args.power_tech = os.path.abspath(args.power_tech)
if not os.path.isfile(args.power_tech):
clean_up_and_exit(
"Power Tech file not found. -%s", args.power_tech)
"Power Tech file not found. -%s" % args.power_tech)
# Expand run directory to absolute path
args.run_dir = os.path.abspath(args.run_dir)
@ -805,7 +805,8 @@ def filter_openfpga_output(vpr_output):
def filter_failed_process_output(vpr_output):
for line in vpr_output.split("\n"):
if "error" in line.lower():
elements_to_log = ["error", "what()"]
if any(match in line.lower() for match in elements_to_log):
logger.error("-->>" + line)