Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable sims in the CI #269

Closed
wants to merge 11 commits into from
30 changes: 30 additions & 0 deletions .github/scripts/parse_rpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,33 @@
print("Flow check is clean!")
else:
print("Flow check failed!")

if len(sys.argv) == 1:
result_filename = "work/prePEX_sim_result" # might remove from check or need to implement different logic later if sim outputs change due to downstream changes
sim_state_filename = "work/sim_state_file.txt"

with open(result_filename) as f2, open("../../../.github/scripts/expected_sim_outputs/prePEX_sim_result.txt") as f1:
saicharan0112 marked this conversation as resolved.
Show resolved Hide resolved
content1 = f2.readlines()
content2 = f1.readlines()
if content1 != content2:
raise ValueError("Simulations failed: simulation result file does not match!")

sim_state = json.load(open("work/sim_state_file.txt"))
if sim_state["failed_sims"] != 0:
raise ValueError("Simulations failed: Non zero failed simulations!")

for folder_num in range(1, sim_state["completed_sims"] + 1):
dir_path = r'simulations/run/'
pex_path = os.listdir(dir_path)

file_name = "simulations/run/" + pex_path + "/" + str(folder_num) + "/"
param_file = file_name + "parameters.txt"
log_file = file_name + "sim_" + str(folder_num) + ".log"
spice_file = file_name + "sim_" + str(folder_num) + ".sp"

if os.path.exists(log_file) and os.path.exists(log_file) and os.path.exists(spice_file):
pass
else:
raise ValueError("Simulations failed: required files do not exist in sim run folders!")

print("Simulations are clean!")
2 changes: 1 addition & 1 deletion .github/workflows/tempSense_sky130hd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ 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 &&\
make sky130hd_temp_full &&\
python3 parse_rpt.py
" && exit_code=$? | tee -a file.log
if [ $? -ne 0 ]; then exit 1; fi
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ If you find this tool useful in your research, we kindly request to cite our pap

- Tutu Ajayi et al., "`An Open-source Framework for Autonomous SoC Design with Analog Block Generation <https://ieeexplore.ieee.org/document/9344104>`_," 2020 IFIP/IEEE 28th International Conference on Very Large Scale Integration (VLSI-SOC), 2020, pp. 141-146.

- Qirui Zhang et al., "`An Open-Source and Autonomous Temperature Sensor Generator Verified With 64 Instances in SkyWater 130 nm for Comprehensive Design Space Exploration <https://ieeexplore.ieee.org/abstract/document/9816083>`_," in IEEE Solid-State Circuits Letters, vol. 5, pp. 174-177, 2022.
- Qirui Zhang et al., "`An Open-Source and Autonomous Temperature Sensor Generator Verified With 64 Instances in SkyWater 130 nm for Comprehensive Design Space Exploration <https://ieeexplore.ieee.org/abstract/document/9816083>`_," in IEEE Solid-State Circuits Letters, vol. 5, pp. 174-177, 2022.
2 changes: 1 addition & 1 deletion conda_versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ magic==8.3.446_1_g1108046
netgen==1.5.262_0_gc1ed4ce
open_pdks.sky130a==1.0.457_0_g32e8f23
openroad==2.0_10905_ge89829335
yosys==0.35_8_g5691cd095
yosys==0.35_8_g5691cd095
2 changes: 1 addition & 1 deletion docker/conda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ COPY ./scripts /scripts

RUN git clone http://git.code.sf.net/p/ngspice/ngspice && \
cd ngspice && \
./compile_linux.sh
./compile_linux.sh
2 changes: 1 addition & 1 deletion docker/conda/packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ flex
libx11-dev
libx11-6
libxaw7-dev
libreadline6-dev
libreadline6-dev
2 changes: 1 addition & 1 deletion openfasoc/generators/PMU-gen/tools/parse_rpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
raise ValueError("LVS failed!")
else:
print("LVS is clean!")
print("Generator check is clean!")
print("Generator check is clean!")
2 changes: 1 addition & 1 deletion openfasoc/generators/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- `common.simulation`
1. `run_simulations()`: Used to run SPICE testbenches with multiple parameters.
- `common.check_gen_files`
1. `check_gen_files(parameters: json_filename, is_tempsense)`: Used to check if the various files that should be generated by the flow are present in their required directories.
1. `check_gen_files(parameters: json_filename, _generator_is, cryo_library)`: Used to check if the various files that should be generated by the flow are present in their required directories.
- `common.check_gen_extensions`
1. Stores the extensions of the files generated by the flow.
See individual function documentation for more information on a particular function.
Expand Down
2 changes: 1 addition & 1 deletion openfasoc/generators/common/check_gen_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ def check_gen_files(json_filename, _generator_is, cryo_library) -> int:
raise ValueError(file + " does not exist!")

#print("Found generated .csv files!")
return 1
return 1
2 changes: 1 addition & 1 deletion openfasoc/generators/cryo-gen/tools/check_gen_extensions
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
_sim.spice
_pex.spice
.sdc
.def
.def
2 changes: 1 addition & 1 deletion openfasoc/generators/cryo-gen/tools/parse_rpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
if check_gen_files(json_filename, _generator_is, cryo_library):
print("Flow check is clean!")
else:
print("Flow check failed!")
print("Flow check failed!")
2 changes: 1 addition & 1 deletion openfasoc/generators/dcdc-gen/tools/parse_rpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
raise ValueError("LVS failed!")
else:
print("LVS is clean!")
print("Generator check is clean!")
print("Generator check is clean!")
3 changes: 1 addition & 2 deletions openfasoc/generators/scpa-gen/tools/parse_rpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
raise ValueError("DRC failed!")
else:
print("DRC is clean!")

print("Generator check is clean!")
print("Generator check is clean!")
2 changes: 1 addition & 1 deletion openfasoc/generators/temp-sense-gen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ banner:
@@echo " | |_| | __/ | |___| |\ | _|/ ___ \ ___) | |_| | |___ "
@@echo " \___/|_| |_____|_| \_|_| /_/ \_\|____/ \___/ \____|"
@@echo ""
@@echo "==============================================================="
@@echo "==============================================================="
2 changes: 1 addition & 1 deletion openfasoc/generators/temp-sense-gen/tools/parse_rpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
if check_gen_files(json_filename, _generator_is, " "):
print("Flow check is clean!")
else:
print("Flow check failed!")
print("Flow check failed!")
2 changes: 1 addition & 1 deletion versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ OpenROAD - 2.0_10905
yosys - 0.35+7
magic - 8.3.447
netgen - 1.5.262
open_pdks - 1.0.457
open_pdks - 1.0.457
Loading