-
Notifications
You must be signed in to change notification settings - Fork 9
195 lines (171 loc) · 7.1 KB
/
precheck.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
name: mpw_precheck
on:
workflow_dispatch:
workflow_run:
workflows: ['gds']
types: [completed]
jobs:
mpw_precheck:
env:
PYTHONIOENCODING: utf-8
PDK_ROOT: /home/runner/pdk
# ubuntu
runs-on: ubuntu-24.04
steps:
# need the repo checked out
- name: checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Load OpenLane environment variables
run: cat .github/config/openlane.txt | tee -a $GITHUB_ENV
- name: Checkout Precheck Repo
uses: actions/checkout@v4
with:
repository: efabless/mpw_precheck
path: mpw_precheck
- name: Install Sky130 PDK
uses: TinyTapeout/volare-action@v2
with:
pdk_name: sky130
pdk_version: ${{ env.SKY130_PDK_VERSION }}
pdk_root: ${{ env.PDK_ROOT }}
- name: Download artifact (run id = ${{ github.event.workflow_run.id }})
uses: dawidd6/action-download-artifact@v6
id: download_artifact
with:
workflow: gds.yaml
run_id: ${{ github.event.workflow_run.id }}
workflow_conclusion: success
name: efabless_submission
path: tinytapeout-submission
- name: Run precheck (run id = ${{ fromJSON(steps.download_artifact.outputs.artifacts)[0].workflow_run.id }})
working-directory: mpw_precheck
run: |
docker run -v $(pwd):/opt/mpw_precheck \
-v "$INPUT_DIRECTORY":"$INPUT_DIRECTORY" -v "$PDK_PATH":"$PDK_PATH" \
-e INPUT_DIRECTORY="$INPUT_DIRECTORY" -e PDK_PATH="$PDK_PATH" -e PDK_ROOT="$PDK_ROOT" \
-u $(id -u "$USER"):$(id -g "$USER") \
-w /opt/mpw_precheck \
efabless/mpw_precheck:latest ./run_precheck.sh --private --skip_checks $SKIP_CHECKS
env:
# magic_drc - it's slow and we're already running it in the gds job
# lvs - slow, currently failing (GL netlist doesn't include user modules), and we're already doing LVS in the gds job
SKIP_CHECKS: |
magic_drc
lvs
PDK_PATH: ${{ env.PDK_ROOT }}/sky130A
INPUT_DIRECTORY: ${{ github.workspace }}/tinytapeout-submission
- name: Upload precheck results
uses: actions/upload-artifact@v4
if: always()
with:
name: precheck_results
path: tinytapeout-submission/precheck_results
mpw_tapeout_checks:
env:
USER_ID: 5454
PROJECT: caravel_openframe
KLAYOUT_VERSION: 0.29.7
MAGIC_VERSION: 8.3.471
PDK_ROOT: ${{ github.workspace }}/pdk
SKY130_PDK_VERSION: 0fe599b2afb6708d281543108caf8310912f54af
CARAVEL_ROOT: ${{ github.workspace }}/caravel
DRC_ROOT: ${{ github.workspace }}/sky130_tapeout_drc
runs-on: ubuntu-24.04
steps:
- name: checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
- name: Checkout Caravel
uses: actions/checkout@v4
with:
repository: efabless/caravel
path: ${{ env.CARAVEL_ROOT }}
- name: Install KLayout
run: |
wget https://www.klayout.org/downloads/Ubuntu-24/klayout_${KLAYOUT_VERSION}-1_amd64.deb
sudo apt-get update
sudo apt-get install -y ./klayout_${KLAYOUT_VERSION}-1_amd64.deb
pip install klayout==${KLAYOUT_VERSION}
- name: Install magic VLSI
run: |
sudo apt-get install -y m4 python3 libx11-dev tcl-dev tk-dev libcairo2-dev mesa-common-dev libglu1-mesa-dev
git clone -b ${MAGIC_VERSION} https://github.com/RTimothyEdwards/magic magic
cd magic
./configure
make -j4
sudo make install
- name: Install Sky130 PDK
uses: TinyTapeout/volare-action@v1
with:
pdk_name: sky130
pdk_version: ${{ env.SKY130_PDK_VERSION }}
pdk_root: ${{ env.PDK_ROOT }}
- name: Download artifact (run id = ${{ github.event.workflow_run.id }})
uses: dawidd6/action-download-artifact@v6
id: download_artifact
with:
workflow: gds.yaml
run_id: ${{ github.event.workflow_run.id }}
workflow_conclusion: success
name: efabless_submission
path: tinytapeout-submission
- name: Create final .oas file
working-directory: ${{ env.CARAVEL_ROOT }}
run: |
sed -i 's/@cp -r /#@cp -r /' Makefile
cp ../tinytapeout-submission/gds/openframe_project_wrapper.gds gds
make openframe
make generate_fill
make final
strm2oas gds/caravel_$USER_ID.gds caravel_$USER_ID.oas
- name: FOM Density DRC
working-directory: ${{ env.CARAVEL_ROOT }}
env:
REPORT_FILE: ${{ env.DRC_ROOT }}/klayout_fom_density_report.xml
run: |
echo "## FOM Density DRC" >> $GITHUB_STEP_SUMMARY
klayout -b -r $DRC_ROOT/fom_density.drc -rd gds_input=gds/caravel_$USER_ID.gds -rd top_cell=caravel_$USER_ID -rd report_file=$REPORT_FILE | tee fom_density.log
grep -v "{{ CHECK }}" fom_density.log >> $GITHUB_STEP_SUMMARY
python $DRC_ROOT/check_drc_report.py $REPORT_FILE
- name: Poly Density DRC
working-directory: ${{ env.CARAVEL_ROOT }}
env:
REPORT_FILE: ${{ env.DRC_ROOT }}/klayout_poly_density_report.xml
run: |
echo "## Poly Density DRC" >> $GITHUB_STEP_SUMMARY
klayout -b -r $DRC_ROOT/poly_density.drc -rd gds_input=gds/caravel_$USER_ID.gds -rd top_cell=caravel_$USER_ID -rd report_file=$REPORT_FILE | tee poly_density.log
grep -v "{{ CHECK }}" poly_density.log >> $GITHUB_STEP_SUMMARY
python $DRC_ROOT/check_drc_report.py $REPORT_FILE
- name: Metal Density DRC
working-directory: ${{ env.CARAVEL_ROOT }}
env:
REPORT_FILE: ${{ env.DRC_ROOT }}/klayout_met_density_report.xml
run: |
echo "## Metal Density DRC" >> $GITHUB_STEP_SUMMARY
klayout -b -r $DRC_ROOT/met_density.lydrc -rd gds_input=gds/caravel_$USER_ID.gds -rd top_cell=caravel_$USER_ID -rd report_file=$REPORT_FILE | tee -a $GITHUB_STEP_SUMMARY
python $DRC_ROOT/check_drc_report.py $REPORT_FILE
- name: Tiled Metal Density DRC
working-directory: ${{ env.CARAVEL_ROOT }}
env:
REPORT_FILE: ${{ env.DRC_ROOT }}/klayout_tiled_met_density_report.xml
run: |
echo "## Tiled Metal Density DRC" >> $GITHUB_STEP_SUMMARY
klayout -b -r $DRC_ROOT/met_density_tiled.drc -rd gds_input=gds/caravel_$USER_ID.gds -rd top_cell=caravel_$USER_ID -rd report_file=$REPORT_FILE | tee -a $GITHUB_STEP_SUMMARY
python $DRC_ROOT/check_drc_report.py $REPORT_FILE
- name: Publish final .oas file
uses: actions/upload-artifact@v4
if: always()
with:
name: final_oas
path: caravel/caravel_*.oas
- name: Publish DRC reports
uses: actions/upload-artifact@v4
if: always()
with:
name: drc_reports
path: ${{ env.DRC_ROOT }}/klayout_*_report.xml