Skip to content

Commit

Permalink
Update parse_rpt.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chetanyagoyal authored Oct 16, 2023
1 parent 95eb257 commit ebae01d
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions openfasoc/generators/cryo-gen/tools/parse_rpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,26 @@
else:
print("LVS is clean!")

with open('test.json', 'r') as file:
data = json.load(file)
print('Found .json config file...')
# with open('test.json', 'r') as file:
# data = json.load(file)
# print('Found .json config file...')

module_name = data.get("module_name", "default")
# module_name = data.get("module_name", "default")

work_dir = "./work/"
# work_dir = "./work/"

# if (os.path.exists(work_dir) == 0):
# raise ValueError("work directory does not exist!")
# else:
# filename = work_dir + module_name
# for file in (filename + ".gds", filename + ".spice", filename + ".v", filename + ".def", filename + "_pex.spice", filename + ".sdc"):
# if (os.path.exists(file) == 0):
# raise ValueError(file + " does not exist!")
# print("Found necessary work result files!")

# for file in ("error_within_x.csv", "golden_error_opt.csv", "search_result.csv"):
# if os.path.exists(file) == 0:
# raise ValueError(file + " does not exist!")
# print("Found generated .csv files!")

if (os.path.exists(work_dir) == 0):
raise ValueError("work directory does not exist!")
else:
filename = work_dir + module_name
for file in (filename + ".gds", filename + ".spice", filename + ".v", filename + ".def", filename + "_pex.spice", filename + ".sdc"):
if (os.path.exists(file) == 0):
raise ValueError(file + " does not exist!")
print("Found necessary work result files!")

for file in ("error_within_x.csv", "golden_error_opt.csv", "search_result.csv"):
if os.path.exists(file) == 0:
raise ValueError(file + " does not exist!")
print("Found generated .csv files!")
print("Generator check is clean!")

0 comments on commit ebae01d

Please sign in to comment.