Skip to content

Commit 22bfa72

Browse files
committed
make: elapsed now looks for .v after .odb for a stage
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 614ecd8 commit 22bfa72

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

flow/util/genElapsedTime.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,22 @@ def print_log_dir_times(logdir, args):
6262
int(line.split("Peak memory: ")[1].split("KB")[0]) / 1024
6363
)
6464

65-
# content hash for .odb file alongside .log file is useful to
65+
# content hash for the result file alongside .log file is useful to
6666
# debug divergent results under what should be identical
6767
# builds(such as local and CI builds)
68-
odb_file = pathlib.Path(
69-
str(f).replace("logs/", "results/").replace(".log", ".odb")
70-
)
71-
if odb_file.exists():
72-
hasher = hashlib.sha1()
73-
with open(odb_file, "rb") as odb_f:
74-
while chunk := odb_f.read(16 * 1024 * 1024):
75-
hasher.update(chunk)
76-
odb_hash = hasher.hexdigest()
77-
else:
78-
odb_hash = "N/A"
68+
for ext in [".odb", ".rtlil", ".v"]:
69+
result_file = pathlib.Path(
70+
str(f).replace("logs/", "results/").replace(".log", ext)
71+
)
72+
if result_file.exists():
73+
hasher = hashlib.sha1()
74+
with open(result_file, "rb") as odb_f:
75+
while chunk := odb_f.read(16 * 1024 * 1024):
76+
hasher.update(chunk)
77+
odb_hash = hasher.hexdigest()
78+
break
79+
else:
80+
odb_hash = "N/A"
7981

8082
if not found:
8183
print("No elapsed time found in", str(f), file=sys.stderr)

0 commit comments

Comments
 (0)