Skip to content

Commit

Permalink
created file extension file to make editable (in common folder)
Browse files Browse the repository at this point in the history
  • Loading branch information
chetanyagoyal committed Nov 8, 2023
1 parent 516ac53 commit f305756
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 70 deletions.
3 changes: 2 additions & 1 deletion openfasoc/generators/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
1. `run_simulations()`: Used to run SPICE testbenches with multiple parameters.
- `common.check_gen_files`
1. `check_gen_files()`: Used to check if the various files that should be generated by the flow are present in their required directories.
- `common.check_gen_extensions`
1. Stores the extensions of the files generated by the flow.
See individual function documentation for more information on a particular function.
"""
6 changes: 6 additions & 0 deletions openfasoc/generators/common/check_gen_extensions
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.gds
.spice
.v
_pex.spice
.sdc
.def
19 changes: 16 additions & 3 deletions openfasoc/generators/common/check_gen_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,23 @@ def check_gen_files():
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!")
extension_file_path = "../common/check_gen_extensions"

if os.path.exists(extension_file_path):
with open(extension_file_path) as f:

for extension in f:
file = "".join([filename, extension.strip()])
if (os.path.exists(file) == 0):
raise ValueError(file + " does not exist!")
else:
print("checking flow results with possibly stale list of extensions...")
extensions = [".sdc", ".gds", ".def", ".spice", ".v", "_pex.spice"]
for extension in extensions:
file = "".join([filename, extension])

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"):
Expand Down
66 changes: 0 additions & 66 deletions openfasoc/generators/cryo-gen/parse_rpt.py

This file was deleted.

0 comments on commit f305756

Please sign in to comment.