diff --git a/.github/workflows/user_project_ci.yml b/.github/workflows/user_project_ci.yml index e8d31a7..cefe273 100644 --- a/.github/workflows/user_project_ci.yml +++ b/.github/workflows/user_project_ci.yml @@ -136,8 +136,6 @@ jobs: needs: [download_deps] steps: - uses: actions/checkout@v4 - with: - submodules: true - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -156,6 +154,12 @@ jobs: #echo "PRECHECK_ROOT=$GITHUB_WORKSPACE/mpw_precheck" >> $GITHUB_ENV echo "MPW_TAG=main" >> $GITHUB_ENV + - name: Install IPM dependencies + run: | + python3 -m pip install --upgrade --no-cache-dir cf-ipm + curl -fsSL -o /tmp/verified_IPs.json https://raw.githubusercontent.com/chipfoundry/ipm/main/verified_IPs.json + ipm install-dep --ip-root $GITHUB_WORKSPACE/ip --local-file /tmp/verified_IPs.json + - name: Download PDK Tarball uses: actions/download-artifact@v4 with: @@ -326,8 +330,6 @@ jobs: needs: [hardening] steps: - uses: actions/checkout@v4 - with: - submodules: true - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.gitignore b/.gitignore index be5c585..7437e28 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,7 @@ runs/ /logs lvs_results/ __pycache__/ +# IPM installs IPs under ip/; keep dependencies.json tracked +/ip/* +!/ip/dependencies.json +!/ip/.gitignore diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index b4093dd..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "CF_gpio_config"] - path = CF_gpio_config - url = https://github.com/chipfoundry/CF_gpio_config diff --git a/CF_gpio_config b/CF_gpio_config deleted file mode 160000 index a8a2252..0000000 --- a/CF_gpio_config +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a8a225255573c0c20dd782916001a0d1b5759b61 diff --git a/README.md b/README.md index 3d51420..9de112c 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ A successful OpenFrame project requires a specific directory layout for the auto | `verilog/rtl/` | Source Verilog code for the project. | | `verilog/gl/` | Gate-level netlists (generated after hardening). | | `verilog/dv/` | Design Verification (cocotb and Verilog testbenches). | +| `ip/` | IPM-installed IPs (for example `CF_gpio_config`). Track `ip/dependencies.json` only. | | `gds/` | Final GDSII binary files for fabrication. | | `lef/` | Library Exchange Format files for the macros. | @@ -89,6 +90,17 @@ The `cf setup` command installs: - OpenLane: The RTL-to-GDS hardening flow. - PDK: Skywater 130nm process design kit. - Timing Scripts: For Static Timing Analysis (STA). +- IPM: The ChipFoundry IP Manager (`cf-ipm`) used to install listed IPs. + +### 4. Install IPM dependencies + +IPs listed in `ip/dependencies.json` (for example `CF_gpio_config`) are not stored in git. After cloning, install them with: + +```bash +ipm install-dep --ip-root ip +``` + +This is required for GPIO pad configuration and any other IPM-managed blocks in `ip/`. --- diff --git a/ip/.gitignore b/ip/.gitignore new file mode 100644 index 0000000..83fe78c --- /dev/null +++ b/ip/.gitignore @@ -0,0 +1,3 @@ +* +!dependencies.json +!.gitignore diff --git a/ip/dependencies.json b/ip/dependencies.json new file mode 100644 index 0000000..831b646 --- /dev/null +++ b/ip/dependencies.json @@ -0,0 +1,7 @@ +{ + "IP": [ + { + "CF_gpio_config": "v1.1.4" + } + ] +} diff --git a/openlane/openframe_project_wrapper/config.json b/openlane/openframe_project_wrapper/config.json index 8389d7f..b75d267 100644 --- a/openlane/openframe_project_wrapper/config.json +++ b/openlane/openframe_project_wrapper/config.json @@ -4,7 +4,7 @@ "VERILOG_FILES": [ "dir::/../../verilog/rtl/openframe_project_netlists.v", "dir::/../../verilog/rtl/openframe_project_wrapper.v", - "dir::/../../CF_gpio_config/rtl/CF_gpio_config.v" + "dir::../../ip/CF_gpio_config/rtl/CF_gpio_config.v" ], "VERILOG_FILES_BLACKBOX": [ "dir::../../verilog/gl/user_proj_timer.v", diff --git a/verilog/includes/includes.rtl.caravel_user_project b/verilog/includes/includes.rtl.caravel_user_project index 5a076c4..656289d 100644 --- a/verilog/includes/includes.rtl.caravel_user_project +++ b/verilog/includes/includes.rtl.caravel_user_project @@ -1,5 +1,6 @@ # Caravel user project includes -v $(USER_PROJECT_VERILOG)/dv/firmware/spiflash.v +-v $(USER_PROJECT_VERILOG)/../ip/CF_gpio_config/rtl/CF_gpio_config.v -v $(USER_PROJECT_VERILOG)/rtl/openframe_project_wrapper.v -v $(USER_PROJECT_VERILOG)/rtl/picosoc.v -v $(USER_PROJECT_VERILOG)/rtl/picorv32.v