Skip to content

mpw_precheck

mpw_precheck #40

Workflow file for this run

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@v3
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: 1
PROJECT: caravel_openframe
KLAYOUT_VERSION: 0.29.2
MAGIC_VERSION: 8.3.471
PDK_ROOT: ${{ github.workspace }}/pdk
SKY130_PDK_VERSION: 0fe599b2afb6708d281543108caf8310912f54af
CARAVEL_ROOT: ${{ github.workspace }}/caravel
runs-on: ubuntu-22.04
steps:
- name: checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- 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-22/klayout_${KLAYOUT_VERSION}-1_amd64.deb
sudo apt-get install -y ./klayout_${KLAYOUT_VERSION}-1_amd64.deb
- 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@v3
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
- name: FOM Density DRC
working-directory: ${{ env.CARAVEL_ROOT }}
run: |
wget https://github.com/efabless/foss-asic-tools/blob/main/images/foss-asic-tools/addons/sak/klayout/tech/sky130A/fom_density.drc
klayout -b -r fom_density.drc -rd gds_input=gds/caravel_1.gds -rd top_cell=caravel_1 -rd report_file=fom_report.xml
# TODO: check that the <items> element in fom_report.xml is empty
xpath -e '/drc_results/items' fom_report.xml | grep -q '<items/>' || exit 1
xmlstarlet sel -t -v "count(/drc_results/items)" fom_report.xml | grep -q '^0$'
- name: Publish final .oas file
uses: actions/upload-artifact@v4
if: always()
with:
name: final_oas
path: caravel/tapeout/outputs/oas/*
- name: Publish DRC reports
uses: actions/upload-artifact@v4
if: always()
with:
name: drc_reports
path: fom_report.xml