Skip to content

Commit

Permalink
Make all updates for modularity
Browse files Browse the repository at this point in the history
  • Loading branch information
chetanyagoyal authored Nov 11, 2023
1 parent bb6c483 commit ba5674c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions openfasoc/generators/cryo-gen/tools/parse_rpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,25 @@
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..'))
from common.check_gen_files import check_gen_files

_generator_is = {
'sky130hvl_ldo': 0,
'sky130hd_temp': 0,
'sky130XX_cryo': 1
}

dir_path = r'flow/reports'
lib = os.listdir(dir_path)
cryo_library = str(lib[0])

drc_filename = "flow/reports/" + str(lib[0]) + "/cryo/6_final_drc.rpt"
drc_filename = "flow/reports/" + cryo_library + "/cryo/6_final_drc.rpt"
num_lines = sum(1 for line in open(drc_filename))

if num_lines > 3:
raise ValueError("DRC failed!")
else:
print("DRC is clean!")

lvs_filename = "flow/reports/" + str(lib[0]) + "/cryo/6_final_lvs.rpt"
lvs_filename = "flow/reports/" + cryo_library + "/cryo/6_final_lvs.rpt"
lvs_line = subprocess.check_output(["tail", "-1", lvs_filename]).decode(
sys.stdout.encoding
)
Expand All @@ -31,7 +38,7 @@

json_filename = "test.json"

if check_gen_files(json_filename, (len(sys.argv) == 1)):
if check_gen_files(json_filename, _generator_is, cryo_library):
print("Flow check is clean!")
else:
print("Flow check failed!")
print("Flow check failed!")

0 comments on commit ba5674c

Please sign in to comment.