4 parser = argparse.ArgumentParser()
7 "-o",
"--Output", help=
"The Output File Path", required=
True)
9 "-i",
"--Input", help=
"The Input File Path", required=
True)
10 parser.add_argument(
"-e",
"--ErrorLocation",
11 help=
"The error BEL location which triggers the error in Vivado", required=
True)
14 args = parser.parse_args()
16 inputFile = open(args.Input,
'r')
17 outputFile = open(args.Output,
'w')
18 targetBELStr = args.ErrorLocation
20 lines = inputFile.readlines()
23 for i, line
in enumerate(lines):
24 if (line.find(targetBELStr) >= 0):
28 for line
in lines[targetLineId:]:
29 if (line.find(
"set result ") >= 0):
32 print(line, file=outputFile, end=
'')