cf-precheck 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cf_precheck-1.0.0/.github/workflows/precheck_test.yml +118 -0
- cf_precheck-1.0.0/.github/workflows/publish.yml +37 -0
- cf_precheck-1.0.0/.gitignore +16 -0
- cf_precheck-1.0.0/LICENSE +201 -0
- cf_precheck-1.0.0/PKG-INFO +123 -0
- cf_precheck-1.0.0/README.md +107 -0
- cf_precheck-1.0.0/debug_precheck.md +95 -0
- cf_precheck-1.0.0/default.cvcrc +36 -0
- cf_precheck-1.0.0/dependencies/Dockerfile +84 -0
- cf_precheck-1.0.0/dependencies/build-docker.sh +18 -0
- cf_precheck-1.0.0/dependencies/hooks/build +4 -0
- cf_precheck-1.0.0/mpw_precheck.py +41 -0
- cf_precheck-1.0.0/pyproject.toml +29 -0
- cf_precheck-1.0.0/src/cf_precheck/__init__.py +1 -0
- cf_precheck-1.0.0/src/cf_precheck/__main__.py +3 -0
- cf_precheck-1.0.0/src/cf_precheck/_default_content/gds/user_analog_project_wrapper.gds +0 -0
- cf_precheck-1.0.0/src/cf_precheck/_default_content/gds/user_project_wrapper_empty_gf180mcu.gds +0 -0
- cf_precheck-1.0.0/src/cf_precheck/_default_content/gds/user_project_wrapper_mini4_empty.gds +0 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/README.md +163 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/check_extraction +58 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/get_location +24 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/lvs_config.md +42 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/run_be_checks +194 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/run_cvc +146 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/run_extract +466 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/run_full_lvs +334 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/run_hier_check +269 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/run_oeb_check +767 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/run_openframe_check +351 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/run_scheck +206 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/scripts/ext.hier.awk +25 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/scripts/floating.awk +50 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/scripts/merge_short.awk +31 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/scripts/remove_disconnect.awk +202 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/cvc.models +77 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/cvc.power.caravan +19 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/cvc.power.caravel +18 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/cvc.power.user_analog_project_wrapper +15 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/cvc.power.user_project_wrapper +15 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/cvcrc +35 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/gf180mcuC.tech +3697 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/gf180mcuC_setup.tcl +399 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/known_abstract_filter.awk +5 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/lvs_config.base.json +26 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/lvs_config.caravel.json +35 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/lvs_config.caravel_core.json +48 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/lvs_config.chip_io.json +65 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/lvs_config.sram256x8m8wm1.json +63 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/lvs_config.user_project_wrapper.json +31 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/remove_well.sed +19 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuC/spi2cdl +42 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/cvc.models +27 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/cvc.power.caravan +19 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/cvc.power.caravel +9 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/cvc.power.user_analog_project_wrapper +15 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/cvc.power.user_project_wrapper +15 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/cvcrc +35 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/gf180mcuD.tech +3985 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/gf180mcuD.tech.446 +3997 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/gf180mcuD_setup.tcl +399 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/known_abstract_filter.awk +8 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/lvs_config.base.json +28 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/lvs_config.caravel.json +35 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/lvs_config.caravel_core.json +39 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/lvs_config.chip_io.json +44 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/lvs_config.sram.json +71 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/lvs_config.sram256x8m8wm1.json +63 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/lvs_config.sram512x8m8wm1.json +65 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/lvs_config.user_project_wrapper.json +31 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/remove_well.sed +6 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/gf180mcuD/spi2cdl +42 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/magicrc +69 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/cvc.models +79 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/cvc.power.caravan +19 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/cvc.power.caravel +18 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/cvc.power.openframe_project_wrapper +39 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/cvc.power.user_analog_project_wrapper +22 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/cvc.power.user_project_wrapper +18 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/cvc.power.user_project_wrapper_mini4 +16 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/cvcrc +35 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/fix_spice +14 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/known.undefined.layer +11 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/known_abstract_filter.awk +5 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/lvs_config.base.json +28 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/lvs_config.caravan_core.json +50 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/lvs_config.caravel.json +38 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/lvs_config.caravel_core.json +49 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/lvs_config.chip_io.json +68 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/lvs_config.chip_io_alt.json +68 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/lvs_config.openframe_project_wrapper.json +33 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/lvs_config.sram.json +30 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/lvs_config.user_analog_project_wrapper.json +33 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/lvs_config.user_project_wrapper.json +34 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/lvs_config.user_project_wrapper_mini4.json +33 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/remove_well.sed +21 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/sky130A.tech +6304 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/sky130A_setup.tcl +542 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130A/spi2cdl +46 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/cvc.models +81 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/cvc.power.caravan +19 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/cvc.power.caravel +18 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/cvc.power.openframe_project_wrapper +39 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/cvc.power.user_analog_project_wrapper +22 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/cvc.power.user_project_wrapper +18 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/cvc.power.user_project_wrapper_mini4 +16 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/cvcrc +35 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/fix_spice +14 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/known.undefined.layer +11 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/known_abstract_filter.awk +6 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/lvs_config.base.json +28 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/lvs_config.caravan_core.json +50 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/lvs_config.caravel.json +38 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/lvs_config.caravel_core.json +49 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/lvs_config.chip_io.json +68 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/lvs_config.chip_io_alt.json +68 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/lvs_config.openframe_project_wrapper.json +33 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/lvs_config.sram.json +27 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/lvs_config.user_analog_project_wrapper.json +33 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/lvs_config.user_project_wrapper.json +34 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/lvs_config.user_project_wrapper_mini4.json +33 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/remove_well.sed +21 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/sky130B.tech +6342 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/sky130B_setup.tcl +557 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/sky130B/spi2cdl +46 -0
- cf_precheck-1.0.0/src/cf_precheck/be_checks/tech/soft.lvs.script +1 -0
- cf_precheck-1.0.0/src/cf_precheck/check_manager.py +99 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/__init__.py +0 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/gpio_defines.py +147 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/illegal_cellname.py +46 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/klayout_drc.py +167 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/lvs.py +49 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/magic_converters/__init__.py +0 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/magic_converters/magic_drc_to_rdb.py +35 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/magic_converters/magic_drc_to_tcl.py +16 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/magic_converters/magic_drc_to_tr_drc.py +31 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/magic_converters/tr2klayout.py +74 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/magic_drc.py +154 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/metal.py +34 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/oeb.py +49 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/pdn.py +53 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/spike.py +43 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/topcell.py +40 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/verilog_assets/gpio_modes_base.v +74 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/verilog_assets/gpio_modes_observe.v +61 -0
- cf_precheck-1.0.0/src/cf_precheck/checks/xor.py +125 -0
- cf_precheck-1.0.0/src/cf_precheck/cli.py +96 -0
- cf_precheck-1.0.0/src/cf_precheck/config.py +245 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/erase_box.tcl +37 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/erase_box_gf180mcu.tcl +37 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/erase_box_mini4.tcl +36 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/erase_box_openframe.tcl +28 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/gdsArea0 +771 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/gds_size.rb +123 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/gf180mcuC_mr.drc +5590 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/gf180mcuD_mr.drc +8516 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/gf180mcu_density.lydrc +42 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/magic_drc_check.tcl +94 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/met_min_ca_density.lydrc +134 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/pin_label_purposes_overlapping_drawing.rb.drc +286 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/sky130A.magicrc +102 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/sky130A_mr.drc +1806 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/sky130B.magicrc +102 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/sky130B_mr.drc +1806 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/xor.rb.drc +45 -0
- cf_precheck-1.0.0/src/cf_precheck/drc_scripts/zeroarea.rb.drc +82 -0
- cf_precheck-1.0.0/src/cf_precheck/logging.py +78 -0
- cf_precheck-1.0.0/src/cf_precheck/results.py +108 -0
- cf_precheck-1.0.0/src/cf_precheck/runner.py +190 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
name: MPW Precheck
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
mpw-precheck:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
include:
|
|
14
|
+
- repo: 'caravel_user_project'
|
|
15
|
+
skip_checks: 'default gpio_defines'
|
|
16
|
+
# - repo: 'caravel_user_mini'
|
|
17
|
+
# skip_checks: ''
|
|
18
|
+
- repo: 'caravel_user_sram'
|
|
19
|
+
skip_checks: 'gpio_defines lvs'
|
|
20
|
+
- repo: 'caravel_user_project_analog'
|
|
21
|
+
skip_checks: 'default gpio_defines lvs'
|
|
22
|
+
- repo: 'openframe_user_project'
|
|
23
|
+
skip_checks: ''
|
|
24
|
+
fail-fast: false
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout chipfoundry/mpw_precheck
|
|
28
|
+
uses: actions/checkout@v4
|
|
29
|
+
with:
|
|
30
|
+
repository: chipfoundry/mpw_precheck
|
|
31
|
+
path: mpw_precheck
|
|
32
|
+
|
|
33
|
+
- name: Checkout ${{ matrix.repo }}
|
|
34
|
+
uses: actions/checkout@v4
|
|
35
|
+
with:
|
|
36
|
+
repository: chipfoundry/${{ matrix.repo }}
|
|
37
|
+
path: ${{ matrix.repo }}
|
|
38
|
+
|
|
39
|
+
- name: Set up Docker Buildx
|
|
40
|
+
uses: docker/setup-buildx-action@v2
|
|
41
|
+
|
|
42
|
+
- name: Cache Docker layers
|
|
43
|
+
uses: actions/cache@v4
|
|
44
|
+
with:
|
|
45
|
+
path: /tmp/.buildx-cache
|
|
46
|
+
key: ${{ runner.os }}-buildx-${{ hashFiles('mpw_precheck/dependencies/Dockerfile') }}
|
|
47
|
+
restore-keys: |
|
|
48
|
+
${{ runner.os }}-buildx-
|
|
49
|
+
|
|
50
|
+
- name: Build Docker image
|
|
51
|
+
run: |
|
|
52
|
+
docker buildx create --use
|
|
53
|
+
docker buildx build \
|
|
54
|
+
--cache-from=type=local,src=/tmp/.buildx-cache \
|
|
55
|
+
--cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max \
|
|
56
|
+
--output type=docker \
|
|
57
|
+
--tag mpw_precheck:latest \
|
|
58
|
+
mpw_precheck/dependencies
|
|
59
|
+
timeout-minutes: 30 # Increased timeout to 30 minutes
|
|
60
|
+
|
|
61
|
+
- name: Move cache
|
|
62
|
+
run: |
|
|
63
|
+
rm -rf /tmp/.buildx-cache
|
|
64
|
+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
|
65
|
+
|
|
66
|
+
- name: Cache PDK
|
|
67
|
+
id: cache-pdk
|
|
68
|
+
uses: actions/cache@v4
|
|
69
|
+
with:
|
|
70
|
+
path: ${{ github.workspace }}/pdk
|
|
71
|
+
key: ${{ runner.os }}-pdk-${{ hashFiles('**/volare.toml') }}
|
|
72
|
+
|
|
73
|
+
- name: Install Volare and PDK
|
|
74
|
+
if: steps.cache-pdk.outputs.cache-hit != 'true'
|
|
75
|
+
run: |
|
|
76
|
+
python3 -m pip install --upgrade --no-cache-dir volare
|
|
77
|
+
volare enable 6d4d11780c40b20ee63cc98e645307a9bf2b2ab8 --pdk-root ${{ github.workspace }}/pdk
|
|
78
|
+
env:
|
|
79
|
+
PDK_ROOT: ${{ github.workspace }}/pdk
|
|
80
|
+
|
|
81
|
+
- name: Run MPW Precheck
|
|
82
|
+
run: |
|
|
83
|
+
export INPUT_DIRECTORY=${{ github.workspace }}/${{ matrix.repo }}
|
|
84
|
+
export PRECHECK_ROOT=${{ github.workspace }}/mpw_precheck
|
|
85
|
+
export OUTPUT_DIRECTORY=$INPUT_DIRECTORY/mpw_precheck_result
|
|
86
|
+
export OUTPUT=$OUTPUT_DIRECTORY/logs/precheck.log
|
|
87
|
+
export PDK_ROOT=${{ github.workspace }}/pdk
|
|
88
|
+
export PDKPATH=$PDK_ROOT/sky130A
|
|
89
|
+
|
|
90
|
+
SKIP_CHECKS_ARG=""
|
|
91
|
+
if [ -n "${{ matrix.skip_checks }}" ]; then
|
|
92
|
+
SKIP_CHECKS_ARG="--skip_checks ${{ matrix.skip_checks }}"
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
docker run -v "$PRECHECK_ROOT":"$PRECHECK_ROOT" \
|
|
96
|
+
-v "$INPUT_DIRECTORY":"$INPUT_DIRECTORY" \
|
|
97
|
+
-v "$PDK_ROOT":"$PDK_ROOT" \
|
|
98
|
+
-e INPUT_DIRECTORY="$INPUT_DIRECTORY" \
|
|
99
|
+
-e PDK_ROOT="$PDK_ROOT" \
|
|
100
|
+
-e PDKPATH="$PDKPATH" \
|
|
101
|
+
-u $(id -u "$USER"):$(id -g "$USER") \
|
|
102
|
+
mpw_precheck:latest \
|
|
103
|
+
bash -c "cd $PRECHECK_ROOT && python3 mpw_precheck.py --input_directory $INPUT_DIRECTORY --pdk_path $PDKPATH --output_directory $OUTPUT_DIRECTORY --skip_checks $SKIP_CHECKS_ARG"
|
|
104
|
+
|
|
105
|
+
if grep -q "All Checks Passed" "$OUTPUT"; then
|
|
106
|
+
echo "All checks passed for ${{ matrix.repo }}"
|
|
107
|
+
exit 0
|
|
108
|
+
else
|
|
109
|
+
echo "Checks failed for ${{ matrix.repo }}"
|
|
110
|
+
exit 1
|
|
111
|
+
fi
|
|
112
|
+
|
|
113
|
+
- name: Upload MPW Precheck output
|
|
114
|
+
uses: actions/upload-artifact@v4
|
|
115
|
+
if: failure()
|
|
116
|
+
with:
|
|
117
|
+
name: mpw-precheck-results-${{ matrix.repo }}
|
|
118
|
+
path: ${{ github.workspace }}/${{ matrix.repo }}/mpw_precheck_result
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Publish Python Package to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout code
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python
|
|
21
|
+
uses: actions/setup-python@v4
|
|
22
|
+
with:
|
|
23
|
+
python-version: '3.11'
|
|
24
|
+
|
|
25
|
+
- name: Install build tools
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
pip install build
|
|
29
|
+
|
|
30
|
+
- name: Build package
|
|
31
|
+
run: |
|
|
32
|
+
python -m build
|
|
33
|
+
|
|
34
|
+
- name: Publish package to PyPI
|
|
35
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
36
|
+
with:
|
|
37
|
+
password: ${{ secrets.PYPI_TOKEN }}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cf-precheck
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: ChipFoundry MPW tapeout precheck tool
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: >=3.9
|
|
8
|
+
Requires-Dist: klayout
|
|
9
|
+
Requires-Dist: numpy
|
|
10
|
+
Requires-Dist: pyverilog
|
|
11
|
+
Requires-Dist: pyyaml
|
|
12
|
+
Requires-Dist: requests
|
|
13
|
+
Requires-Dist: rich
|
|
14
|
+
Requires-Dist: strsimpy
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# cf-precheck
|
|
18
|
+
|
|
19
|
+
ChipFoundry MPW tapeout precheck tool. Validates user projects before shuttle submission by running a sequence of design-rule and consistency checks.
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install cf-precheck
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### External tool dependencies
|
|
28
|
+
|
|
29
|
+
Some checks invoke external EDA tools that must be available on `$PATH`:
|
|
30
|
+
|
|
31
|
+
- [KLayout](https://www.klayout.de/) — used by all Klayout DRC checks and the XOR check
|
|
32
|
+
- [Magic](http://opencircuitdesign.com/magic/) — used by the optional Magic DRC check and LVS
|
|
33
|
+
- [Netgen](http://opencircuitdesign.com/netgen/) — used by the LVS check
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
cf-precheck -i <project_dir> -p <pdk_path> -c <caravel_root> [options] [check ...]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Required arguments
|
|
42
|
+
|
|
43
|
+
| Flag | Description |
|
|
44
|
+
|------|-------------|
|
|
45
|
+
| `-i`, `--input-directory` | Path to the user project directory |
|
|
46
|
+
| `-p`, `--pdk-path` | Path to the PDK installation (variant-specific, e.g. `$PDK_ROOT/sky130A`) |
|
|
47
|
+
| `-c`, `--caravel-root` | Path to the golden Caravel root (or set `$GOLDEN_CARAVEL`) |
|
|
48
|
+
|
|
49
|
+
### Optional arguments
|
|
50
|
+
|
|
51
|
+
| Flag | Description |
|
|
52
|
+
|------|-------------|
|
|
53
|
+
| `-o`, `--output-directory` | Output directory (default: `<project>/precheck_results/<timestamp>`) |
|
|
54
|
+
| `--magic-drc` | Include the Magic DRC check (off by default) |
|
|
55
|
+
| `--skip-checks check [...]` | Skip specific checks |
|
|
56
|
+
| `-v`, `--verbose` | Show verbose/debug output |
|
|
57
|
+
| `--version` | Print version and exit |
|
|
58
|
+
|
|
59
|
+
### Positional arguments
|
|
60
|
+
|
|
61
|
+
Pass one or more check names to run only those checks. If omitted, all applicable checks are run.
|
|
62
|
+
|
|
63
|
+
### Example
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Run all checks
|
|
67
|
+
cf-precheck -i ./my_project -p $PDK_ROOT/sky130A -c ./caravel
|
|
68
|
+
|
|
69
|
+
# Run only specific checks
|
|
70
|
+
cf-precheck -i ./my_project -p $PDK_ROOT/sky130A -c ./caravel topcell_check gpio_defines
|
|
71
|
+
|
|
72
|
+
# Include the optional Magic DRC check
|
|
73
|
+
cf-precheck -i ./my_project -p $PDK_ROOT/sky130A -c ./caravel --magic-drc
|
|
74
|
+
|
|
75
|
+
# Skip certain checks
|
|
76
|
+
cf-precheck -i ./my_project -p $PDK_ROOT/sky130A -c ./caravel --skip-checks lvs oeb
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Checks
|
|
80
|
+
|
|
81
|
+
| Check | Description |
|
|
82
|
+
|-------|-------------|
|
|
83
|
+
| `topcell_check` | Validates the top cell name in the GDS |
|
|
84
|
+
| `gpio_defines` | Validates GPIO directives in `verilog/rtl/user_defines.v` |
|
|
85
|
+
| `pdn` | Power distribution network check |
|
|
86
|
+
| `metal_check` | Metal density check |
|
|
87
|
+
| `xor` | XOR comparison against the golden wrapper to detect out-of-bounds edits |
|
|
88
|
+
| `magic_drc` | Full DRC using Magic *(optional, off by default)* |
|
|
89
|
+
| `klayout_feol` | Klayout Front End Of Line DRC |
|
|
90
|
+
| `klayout_beol` | Klayout Back End Of Line DRC |
|
|
91
|
+
| `klayout_offgrid` | Klayout off-grid violations check |
|
|
92
|
+
| `klayout_metal_minimum_clear_area_density` | Klayout metal density check |
|
|
93
|
+
| `klayout_pin_label_purposes_overlapping_drawing` | Klayout pin/label overlap check |
|
|
94
|
+
| `klayout_zero_area` | Klayout zero-area cell check |
|
|
95
|
+
| `spike_check` | Detects voltage spikes in the design |
|
|
96
|
+
| `illegal_cellname_check` | Detects cells with illegal names |
|
|
97
|
+
| `oeb` | Output-enable-bar signal connectivity check |
|
|
98
|
+
| `lvs` | Layout vs. Schematic check |
|
|
99
|
+
|
|
100
|
+
## Results
|
|
101
|
+
|
|
102
|
+
Check results are saved to `<project>/.cf/project.json` under the `precheck` key:
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"precheck": {
|
|
107
|
+
"version": "1.0.0",
|
|
108
|
+
"timestamp": "2026-03-17T12:00:00+00:00",
|
|
109
|
+
"pdk": "sky130A",
|
|
110
|
+
"passed": false,
|
|
111
|
+
"checks": {
|
|
112
|
+
"topcell_check": { "status": "pass", "duration_s": 1.2 },
|
|
113
|
+
"gpio_defines": { "status": "fail", "duration_s": 0.8, "details": "..." }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Detailed logs are written to `<project>/precheck_results/<timestamp>/logs/precheck.log`.
|
|
120
|
+
|
|
121
|
+
## License
|
|
122
|
+
|
|
123
|
+
Apache-2.0
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# cf-precheck
|
|
2
|
+
|
|
3
|
+
ChipFoundry MPW tapeout precheck tool. Validates user projects before shuttle submission by running a sequence of design-rule and consistency checks.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install cf-precheck
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### External tool dependencies
|
|
12
|
+
|
|
13
|
+
Some checks invoke external EDA tools that must be available on `$PATH`:
|
|
14
|
+
|
|
15
|
+
- [KLayout](https://www.klayout.de/) — used by all Klayout DRC checks and the XOR check
|
|
16
|
+
- [Magic](http://opencircuitdesign.com/magic/) — used by the optional Magic DRC check and LVS
|
|
17
|
+
- [Netgen](http://opencircuitdesign.com/netgen/) — used by the LVS check
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
cf-precheck -i <project_dir> -p <pdk_path> -c <caravel_root> [options] [check ...]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Required arguments
|
|
26
|
+
|
|
27
|
+
| Flag | Description |
|
|
28
|
+
|------|-------------|
|
|
29
|
+
| `-i`, `--input-directory` | Path to the user project directory |
|
|
30
|
+
| `-p`, `--pdk-path` | Path to the PDK installation (variant-specific, e.g. `$PDK_ROOT/sky130A`) |
|
|
31
|
+
| `-c`, `--caravel-root` | Path to the golden Caravel root (or set `$GOLDEN_CARAVEL`) |
|
|
32
|
+
|
|
33
|
+
### Optional arguments
|
|
34
|
+
|
|
35
|
+
| Flag | Description |
|
|
36
|
+
|------|-------------|
|
|
37
|
+
| `-o`, `--output-directory` | Output directory (default: `<project>/precheck_results/<timestamp>`) |
|
|
38
|
+
| `--magic-drc` | Include the Magic DRC check (off by default) |
|
|
39
|
+
| `--skip-checks check [...]` | Skip specific checks |
|
|
40
|
+
| `-v`, `--verbose` | Show verbose/debug output |
|
|
41
|
+
| `--version` | Print version and exit |
|
|
42
|
+
|
|
43
|
+
### Positional arguments
|
|
44
|
+
|
|
45
|
+
Pass one or more check names to run only those checks. If omitted, all applicable checks are run.
|
|
46
|
+
|
|
47
|
+
### Example
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Run all checks
|
|
51
|
+
cf-precheck -i ./my_project -p $PDK_ROOT/sky130A -c ./caravel
|
|
52
|
+
|
|
53
|
+
# Run only specific checks
|
|
54
|
+
cf-precheck -i ./my_project -p $PDK_ROOT/sky130A -c ./caravel topcell_check gpio_defines
|
|
55
|
+
|
|
56
|
+
# Include the optional Magic DRC check
|
|
57
|
+
cf-precheck -i ./my_project -p $PDK_ROOT/sky130A -c ./caravel --magic-drc
|
|
58
|
+
|
|
59
|
+
# Skip certain checks
|
|
60
|
+
cf-precheck -i ./my_project -p $PDK_ROOT/sky130A -c ./caravel --skip-checks lvs oeb
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Checks
|
|
64
|
+
|
|
65
|
+
| Check | Description |
|
|
66
|
+
|-------|-------------|
|
|
67
|
+
| `topcell_check` | Validates the top cell name in the GDS |
|
|
68
|
+
| `gpio_defines` | Validates GPIO directives in `verilog/rtl/user_defines.v` |
|
|
69
|
+
| `pdn` | Power distribution network check |
|
|
70
|
+
| `metal_check` | Metal density check |
|
|
71
|
+
| `xor` | XOR comparison against the golden wrapper to detect out-of-bounds edits |
|
|
72
|
+
| `magic_drc` | Full DRC using Magic *(optional, off by default)* |
|
|
73
|
+
| `klayout_feol` | Klayout Front End Of Line DRC |
|
|
74
|
+
| `klayout_beol` | Klayout Back End Of Line DRC |
|
|
75
|
+
| `klayout_offgrid` | Klayout off-grid violations check |
|
|
76
|
+
| `klayout_metal_minimum_clear_area_density` | Klayout metal density check |
|
|
77
|
+
| `klayout_pin_label_purposes_overlapping_drawing` | Klayout pin/label overlap check |
|
|
78
|
+
| `klayout_zero_area` | Klayout zero-area cell check |
|
|
79
|
+
| `spike_check` | Detects voltage spikes in the design |
|
|
80
|
+
| `illegal_cellname_check` | Detects cells with illegal names |
|
|
81
|
+
| `oeb` | Output-enable-bar signal connectivity check |
|
|
82
|
+
| `lvs` | Layout vs. Schematic check |
|
|
83
|
+
|
|
84
|
+
## Results
|
|
85
|
+
|
|
86
|
+
Check results are saved to `<project>/.cf/project.json` under the `precheck` key:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"precheck": {
|
|
91
|
+
"version": "1.0.0",
|
|
92
|
+
"timestamp": "2026-03-17T12:00:00+00:00",
|
|
93
|
+
"pdk": "sky130A",
|
|
94
|
+
"passed": false,
|
|
95
|
+
"checks": {
|
|
96
|
+
"topcell_check": { "status": "pass", "duration_s": 1.2 },
|
|
97
|
+
"gpio_defines": { "status": "fail", "duration_s": 0.8, "details": "..." }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Detailed logs are written to `<project>/precheck_results/<timestamp>/logs/precheck.log`.
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+
|
|
107
|
+
Apache-2.0
|