Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
chetanyagoyal authored Nov 11, 2023
1 parent 8ac2a58 commit 93c824f
Showing 1 changed file with 43 additions and 33 deletions.
76 changes: 43 additions & 33 deletions .github/scripts/parse_rpt.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
###########################################################################################################
## 1. DRC and LVS Filename Declaration - ##
## This section declares the possible DRC and LVS filenames for the different generators ##
## The if condition checks for sky130hd_temp and sky130hvl_ldo, and the elif condition ##
## checks for the various possible cryo libraries (sky130hd_cryo, sky130hs_cryo, sky130hvl_cryo) ##
## ##
## 2. DRC Check - ##
## The if condition checks if the content in the generated DRC report file matches the template ##
## report DRC report file stored in .github/scripts/expected_drc_reports/ . ##
## The else condition checks if the number of lines in the DRC report files for the temp-sense- ##
## gen and cryo-gen is greater than 3 (which is the case if there is a non-zero number of errors ##
## in the make process ##
## ##
## 3. LVS Check - ##
## The if condition checks if the LVS report generated by the cryo-gen make has the word 'failed' ##
## in the last line (throws an error if yes). ##
## The else condition carries out a search for the word 'failed' in the LVS reports for ldo-gen ##
## and temp-sense-gen and raises a valueError if found. ##
## ##
## 4. Result File Check - ##
## This section calls the check_gen_files() function in generators/common/check_gen_files.py ##
## script. This function checks if the various files (.v, .sdc, .cdl, .sp, .spice, etc) have been ##
## generated for the required generators. ##
## Takes input parameters as the test.json filename, the dictionary of possible generators, and ##
## the cryo_library ##
###########################################################################################################
############################################################################################################
## ##
## The _generator_is variable is a dictionary of keys and value that has information about which ##
## workflow is being run. The values for each keys are decided based on how this script is called ##
## by the .yml files in .github/workflows ##
## ##
## The cryo_library variable is used to ascertain which library (sky130hd_cryo, sky130hs_cryo, ##
## sky130hvl_cryo) workflow is being run ##
## ##
## 1. DRC and LVS Filename Declaration - ##
## This section declares the possible DRC and LVS filenames for the different generators ##
## The if condition checks for sky130hd_temp and sky130hvl_ldo, and the elif condition ##
## checks for the various possible cryo libraries ##
## ##
## 2. DRC Check - ##
## The if condition checks if the content in the generated DRC report file matches the template ##
## report DRC report file stored in .github/scripts/expected_drc_reports/ . ##
## The else condition checks if the number of lines in the DRC report files for the temp-sense- ##
## gen and cryo-gen is greater than 3 (which is the case if there is a non-zero number of errors ##
## in the make process ##
## ##
## 3. LVS Check - ##
## The if condition checks if the LVS report generated by the cryo-gen make has the word 'failed' ##
## in the last line (throws an error if yes). ##
## The else condition carries out a search for the word 'failed' in the LVS reports for ldo-gen ##
## and temp-sense-gen and raises a valueError if found. ##
## ##
## 4. Result File Check - ##
## This section calls the check_gen_files() function in generators/common/check_gen_files.py ##
## script. This function checks if the various files (.v, .sdc, .cdl, .sp, .spice, etc) have been ##
## generated for the required generators. ##
## Takes input parameters as the test.json filename, the dictionary of possible generators, and ##
## the cryo_library ##
## ##
############################################################################################################


import sys
Expand All @@ -47,18 +56,19 @@
if sys.argv[1] == 'sky130hvl_ldo':
_generator_is['sky130hvl_ldo'] = 1
else:
_generator_is['sky13XX_cryo'] = 1
_generator_is['sky130XX_cryo'] = 1

# check which cryo-gen library's check is possibly being run
dir_path = r'flow/reports'
lib = os.listdir(dir_path)
cryo_library = str(lib[0])
if _generator_is['sky130XX_cryo']:
# check which cryo-gen library's workflow is being run
dir_path = r'flow/reports'
lib = os.listdir(dir_path)
cryo_library = str(lib[0])

## DRC and LVS Filename Declaration
if _generator_is['sky130hd_temp'] or _generator_is['sky130hvl_ldo']:
drc_filename = "work/6_final_drc.rpt"
lvs_filename = "work/6_final_lvs.rpt"
elif _generator_is['sky130XX_cryo'] and (sys.argv[1] == cryo_library):
elif sys.argv[1] == cryo_library:
drc_filename = "flow/reports/" + sys.argv[1] + "/cryo/6_final_drc.rpt"
lvs_filename = "flow/reports/" + sys.argv[1] + "/cryo/6_final_lvs.rpt"

Expand All @@ -80,7 +90,7 @@


## LVS Check
if _generator_is['sky130XX_cryo'] and (sys.argv[1] == cryo_library):
if sys.argv[1] == cryo_library:
lvs_line = subprocess.check_output(["tail", "-1", lvs_filename]).decode(
sys.stdout.encoding
)
Expand Down

0 comments on commit 93c824f

Please sign in to comment.