Skip to content

Commit 080854e

Browse files
committed
make: fix out of ORFS tree 'make metadata'
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent a088445 commit 080854e

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

flow/util/genMetrics.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from glob import glob
2020

2121
# make sure the working dir is flow/
22-
os.chdir(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
22+
flow_home = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")
2323

2424
# Parse and validate arguments
2525
# =============================================================================
@@ -29,13 +29,6 @@ def parse_args():
2929
parser = argparse.ArgumentParser(
3030
description="Generates metadata from OpenROAD flow"
3131
)
32-
parser.add_argument(
33-
"--flowPath",
34-
"-f",
35-
required=False,
36-
default="./",
37-
help="Path to the flow directory",
38-
)
3932
parser.add_argument(
4033
"--design",
4134
"-d",
@@ -66,11 +59,6 @@ def parse_args():
6659
parser.add_argument("--hier", "-x", action="store_true", help="Hierarchical JSON")
6760
args = parser.parse_args()
6861

69-
if not os.path.isdir(args.flowPath):
70-
print("[ERROR] flowPath does not exist")
71-
print("Path: " + args.flowPath)
72-
exit(1)
73-
7462
return args
7563

7664

@@ -102,7 +90,7 @@ def extractTagFromFile(
10290

10391
# Open file
10492
try:
105-
searchFilePath = os.path.join(args.flowPath, file)
93+
searchFilePath = file
10694
with open(searchFilePath) as f:
10795
content = f.read()
10896

@@ -438,7 +426,7 @@ def extract_metrics(cwd, platform, design, flow_variant, output, hier_json):
438426
f.write(all_df.to_html())
439427
else:
440428
metrics_dict, metrics_df = extract_metrics(
441-
args.flowPath,
429+
os.getcwd(),
442430
args.platform,
443431
args.design,
444432
args.flowVariant,

0 commit comments

Comments
 (0)