[Script] Bug fix

This commit is contained in:
tangxifan 2020-11-28 15:01:09 -07:00
parent d70bcbb7ca
commit 4e9b07125e
1 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ for line in vsim_log_file:
num_sim_err = int(re.findall("# Simulation finish with(\s+)(\d+) errors", line)[0][1]) num_sim_err = int(re.findall("# Simulation finish with(\s+)(\d+) errors", line)[0][1])
num_err_lines_found = num_err_lines_found + 1 num_err_lines_found = num_err_lines_found + 1
if (0 < num_sim_err) : if (0 < num_sim_err) :
logging.error("Simulation failed with " + num_sim_err + " errors!\n") logging.error("Simulation failed with " + str(num_sim_err) + " errors!\n")
# Add to total errors # Add to total errors
num_err = num_err + num_sim_err num_err = num_err + num_sim_err
# Check total errors by Modelsim # Check total errors by Modelsim
@ -137,7 +137,7 @@ vsim_log_file.close()
if (0 == num_err_lines_found) : if (0 == num_err_lines_found) :
logging.error("No error lines found!Something wrong in setting up modelsim simulation\n") logging.error("No error lines found!Something wrong in setting up modelsim simulation\n")
elif (0 < num_err) : elif (0 < num_err) :
logging.error("ModelSim failed with " + num_err + " errors!\n") logging.error("ModelSim failed with " + str(num_err) + " errors!\n")
else : else :
verification_passed = True verification_passed = True