From 35dc71d18b3c87d8b85eff74aac4d6044eb77d82 Mon Sep 17 00:00:00 2001 From: chetanyagoyal Date: Tue, 5 Dec 2023 12:58:11 +0000 Subject: [PATCH] change dir structure, make new job for temp-sense sims --- .../cryo-gen/postPEX_sim_result | 0 .../cryo-gen/prePEX_sim_result | 0 .../ldo-gen/postPEX_sim_result | 0 .../ldo-gen/prePEX_sim_result | 0 .../temp-sense-gen/postPEX_sim_result | 0 .../{ => temp-sense-gen}/prePEX_sim_result | 0 .github/scripts/parse_rpt.py | 6 +++-- .github/workflows/tempSense_sky130hd.yml | 23 ++++++++++++++++++- 8 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 .github/scripts/expected_sim_outputs/cryo-gen/postPEX_sim_result create mode 100644 .github/scripts/expected_sim_outputs/cryo-gen/prePEX_sim_result create mode 100644 .github/scripts/expected_sim_outputs/ldo-gen/postPEX_sim_result create mode 100644 .github/scripts/expected_sim_outputs/ldo-gen/prePEX_sim_result create mode 100644 .github/scripts/expected_sim_outputs/temp-sense-gen/postPEX_sim_result rename .github/scripts/expected_sim_outputs/{ => temp-sense-gen}/prePEX_sim_result (100%) diff --git a/.github/scripts/expected_sim_outputs/cryo-gen/postPEX_sim_result b/.github/scripts/expected_sim_outputs/cryo-gen/postPEX_sim_result new file mode 100644 index 000000000..e69de29bb diff --git a/.github/scripts/expected_sim_outputs/cryo-gen/prePEX_sim_result b/.github/scripts/expected_sim_outputs/cryo-gen/prePEX_sim_result new file mode 100644 index 000000000..e69de29bb diff --git a/.github/scripts/expected_sim_outputs/ldo-gen/postPEX_sim_result b/.github/scripts/expected_sim_outputs/ldo-gen/postPEX_sim_result new file mode 100644 index 000000000..e69de29bb diff --git a/.github/scripts/expected_sim_outputs/ldo-gen/prePEX_sim_result b/.github/scripts/expected_sim_outputs/ldo-gen/prePEX_sim_result new file mode 100644 index 000000000..e69de29bb diff --git a/.github/scripts/expected_sim_outputs/temp-sense-gen/postPEX_sim_result b/.github/scripts/expected_sim_outputs/temp-sense-gen/postPEX_sim_result new file mode 100644 index 000000000..e69de29bb diff --git a/.github/scripts/expected_sim_outputs/prePEX_sim_result b/.github/scripts/expected_sim_outputs/temp-sense-gen/prePEX_sim_result similarity index 100% rename from .github/scripts/expected_sim_outputs/prePEX_sim_result rename to .github/scripts/expected_sim_outputs/temp-sense-gen/prePEX_sim_result diff --git a/.github/scripts/parse_rpt.py b/.github/scripts/parse_rpt.py index de2139e5e..e079b52a1 100644 --- a/.github/scripts/parse_rpt.py +++ b/.github/scripts/parse_rpt.py @@ -48,6 +48,8 @@ elif len(sys.argv) > 1: if sys.argv[1] == 'sky130hvl_ldo': _generator_is['sky130hvl_ldo'] = 1 + elif sys.argv[1] == 'sky130hd_temp_full': + _generator_is['sky130hd_temp'] = 1 else: _generator_is['sky130XX_cryo'] = 1 @@ -114,11 +116,11 @@ else: print("Flow check failed!") -if len(sys.argv) == 1: +if len(sys.argv) > 1 and sys.argv[1] == "sky130hd_temp_full": sim_state_filename = "work/sim_state_file.txt" result_filename = "work/prePEX_sim_result" - template_filename = "../../../.github/scripts/expected_sim_outputs/prePEX_sim_result" + template_filename = "../../../.github/scripts/expected_sim_outputs/temp-sense-gen/prePEX_sim_result" with open(result_filename) as f2, open(template_filename) as f1: content1 = f2.readlines() content2 = f1.readlines() diff --git a/.github/workflows/tempSense_sky130hd.yml b/.github/workflows/tempSense_sky130hd.yml index 7182b97ae..5b514c83b 100644 --- a/.github/workflows/tempSense_sky130hd.yml +++ b/.github/workflows/tempSense_sky130hd.yml @@ -39,8 +39,29 @@ jobs: 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_full &&\ + make sky130hd_temp &&\ python3 parse_rpt.py " && exit_code=$? | tee -a file.log if [ $? -ne 0 ]; then exit 1; fi if grep "\[ERROR\]" file.log; then exit 1; else exit 0; fi + + - name: Test sky130hd Temp sensor simulations + env: + IMAGE_NAME: msaligane/openfasoc:stable + run: | + cd $GITHUB_WORKSPACE + touch sim_file.log + docker run --rm \ + -v $PWD:$PWD\ + -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 clean &&\ + make sky130hd_temp_full &&\ + python3 parse_rpt.py sky130hd_temp_full + " && exit_code=$? | tee -a file.log + if [ $? -ne 0 ]; then exit 1; fi + if grep "\[ERROR\]" file.log; then exit 1; else exit 0; fi \ No newline at end of file