Skip to content

Commit

Permalink
Merge pull request #215 from michahn01/main
Browse files Browse the repository at this point in the history
CI workflow files modified to use parse_rpt.py
  • Loading branch information
msaligane authored Jul 19, 2023
2 parents f051d71 + 6bec09c commit e32e033
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 89 deletions.
18 changes: 18 additions & 0 deletions .github/scripts/expected_drc_reports/expected_ldo_drc.rpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ldoInst count:
----------------------------------------
Deep N-well spacing to N-well < 4.5um (nwell.7)
----------------------------------------
211.510um 138.670um 213.545um 143.170um
211.510um 138.670um 213.545um 143.385um
211.510um 138.670um 213.545um 143.385um
----------------------------------------

ldoInst count:
----------------------------------------
Deep N-well spacing to N-well < 4.5um (nwell.7)
----------------------------------------
211.510um 138.670um 213.545um 143.170um
211.510um 138.670um 213.545um 143.385um
211.510um 138.670um 213.545um 143.385um
----------------------------------------

28 changes: 16 additions & 12 deletions .github/scripts/parse_rpt.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
import sys

if len(sys.argv) == 1:
drc_filename = "work/6_final_drc.rpt"
else:
drc_filename = "work/" + sys.argv[1] + "/6_final_drc.rpt"
sys.stdout.flush()


if len(sys.argv) == 1:
if len(sys.argv) == 1 or sys.argv[1] == "sky130hvl_ldo":
drc_filename = "work/6_final_drc.rpt"
lvs_filename = "work/6_final_lvs.rpt"
else:
lvs_filename = "work/" + sys.argv[1] + "/6_final_lvs.rpt"


num_lines = sum(1 for line in open(drc_filename))

if num_lines > 3:
drc_filename = "work/"+sys.argv[1]+"/6_final_drc.rpt"
lvs_filename = "work/"+sys.argv[1]+"/6_final_lvs.rpt"

if len(sys.argv) > 1 and sys.argv[1] == "sky130hvl_ldo":
with open(drc_filename, 'r') as f1, open("../../../.github/scripts/expected_drc_reports/expected_ldo_drc.rpt", 'r') as f2:
content1 = f1.readlines()
content2 = f2.readlines()
if content1 == content1:
print("DRC is clean!")
else:
raise ValueError("DRC failed!")

elif sum(1 for line in open(drc_filename)) > 3:
raise ValueError("DRC failed!")
else:
print("DRC is clean!")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
name: sky130hd_cryo-generator
name: Cryo Generator Workflow

on:
push:
branches:
- main
- main
pull_request:
workflow_dispatch:

jobs:
sky130hd_ldoGen:
cryoGenerator:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [sky130hd, sky130hs, sky130hvl]

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Test sky130hd Cryo Gen
- name: Test ${{ matrix.platform }} Cryo Gen
env:
IMAGE_NAME: msaligane/openfasoc:stable
run: |
Expand All @@ -28,7 +32,7 @@ jobs:
cp ./.github/scripts/parse_rpt.py ./openfasoc/generators/cryo-gen/. &&\
pip3 install -r requirements.txt &&\
cd ./openfasoc/generators/cryo-gen &&\
make sky130hd_cryo &&\
python3 parse_rpt.py sky130hd
make ${{ matrix.platform }}_cryo &&\
python3 parse_rpt.py ${{ matrix.platform }}
"| tee -a file.log
if grep "^Error" file.log; then exit 1; else exit 0; fi
34 changes: 0 additions & 34 deletions .github/workflows/cryo_sky130hs.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/cryo_sky130hvl.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/ldo_sky130hvl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ jobs:
-w $PWD\
$IMAGE_NAME\
bash -c "\
cp ./.github/scripts/parse_rpt.py ./openfasoc/generators/ldo-gen/. &&\
pip3 install -r requirements.txt &&\
cd ./openfasoc/generators/ldo-gen &&\
make sky130hvl_ldo\
make sky130hvl_ldo &&\
python3 parse_rpt.py sky130hvl_ldo
"| tee -a file.log
if grep "\[ERROR\]" file.log; then exit 1; else exit 0; fi
6 changes: 4 additions & 2 deletions .github/workflows/tempSense_sky130hd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ jobs:
-w $PWD\
$IMAGE_NAME\
bash -c "\
cp ./.github/scripts/parse_rpt.py ./openfasoc/generators/temp-sense-gen/. &&\
pip3 install -r requirements.txt &&\
cd ./openfasoc/generators/temp-sense-gen &&\
make sky130hd_temp\
">> file.log
make sky130hd_temp &&\
python3 parse_rpt.py
"| tee -a file.log
if grep "\[ERROR\]" file.log; then exit 1; else exit 0; fi

0 comments on commit e32e033

Please sign in to comment.