Skip to content

Commit

Permalink
Convert documentation to google docstring format
Browse files Browse the repository at this point in the history
  • Loading branch information
chetanyagoyal authored Nov 11, 2023
1 parent 93c824f commit 837a924
Showing 1 changed file with 24 additions and 35 deletions.
59 changes: 24 additions & 35 deletions .github/scripts/parse_rpt.py
Original file line number Diff line number Diff line change
@@ -1,39 +1,28 @@
############################################################################################################
## ##
## 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 ##
## ##
############################################################################################################
"""
This script performs checks on generated files and reports for different generators based on workflow parameters.
The `_generator_is` variable is a dictionary with keys and values indicating information about the workflow being run.
Values for each key are determined by how this script is called by the .yml files in .github/workflows.
The `cryo_library` variable is used to determine which library (sky130hd_cryo, sky130hs_cryo, sky130hvl_cryo) the workflow is targeting.
1. DRC and LVS Filename Declaration:
This section declares possible DRC and LVS filenames for different generators.
The first condition checks for sky130hd_temp and sky130hvl_ldo, while the elif condition checks for various cryo libraries.
2. DRC Check:
- Checks if the content in the generated DRC report file matches the template DRC report file stored in .github/scripts/expected_drc_reports/.
- If the number of lines in the DRC report files for temp-sense-gen and cryo-gen is greater than 3, it indicates non-zero errors in the make process.
3. LVS Check:
- Checks if the LVS report generated by the cryo-gen make has the word 'failed' in the last line, raising an error if found.
- Conducts a search for the word 'failed' in the LVS reports for ldo-gen and temp-sense-gen, raising a ValueError if found.
4. Result File Check:
- Calls the check_gen_files() function from generators/common/check_gen_files.py.
- Checks if various files (.v, .sdc, .cdl, .sp, .spice, etc.) have been generated for the required generators.
- Takes input parameters: the test.json filename, the dictionary of possible generators, and the cryo_library.
"""

import sys
import json
Expand Down

0 comments on commit 837a924

Please sign in to comment.