From c2d730645352418836065b17b1aec42dab9cec6d Mon Sep 17 00:00:00 2001 From: Lorenzo Leone Date: Thu, 12 Mar 2026 14:52:26 +0100 Subject: [PATCH 1/4] ci: Move gitlab CI to open repo --- .gitignore | 2 ++ .gitlab-ci.yml | 67 +++++++++++++++++++++++++++++++++++++++++++ .gitlab/gitlab-ci.yml | 38 ------------------------ chimera.mk | 11 ------- 4 files changed, 69 insertions(+), 49 deletions(-) create mode 100644 .gitlab-ci.yml delete mode 100644 .gitlab/gitlab-ci.yml diff --git a/.gitignore b/.gitignore index 383c6ab..4319689 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,8 @@ utils/verible-verilog # SIM +*trace*.log +*wave*.do target/sim/models target/sim/vsim/work target/sim/vsim/transcript diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..a28b643 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,67 @@ +# Copyright 2024 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + +# Lorenzo Leone +# Sergio Mazzola + + +variables: + # Enable colors in CI terminal + TERM: ansi + FORCE_COLOR: 1 + VSIM_TESTS: '["testCluster", "testClusterOffload", "testMemBypass", "testPeripheralsGating", "testHyperbusAddr", "testCfgBootAddr"]' + BINARY_DIR: ./sw/tests + +default: + before_script: + # Install python virtual environment + - source iis-env.sh + # Set up environment + - export PATH=$RISCV_GCC_BINROOT:$PATH + - env + +stages: + - build + - test + +.base: + artifacts: + when: always + expire_in: 1 week + +vsim-build: + extends: .base + stage: build + script: + # Checkout dependencies + - bender checkout + # Build hardware + - make chs-hw-init + - make sn-hw-all + # Build Chimera SW + - make chim-sw + # Build Chimera Bootrom + - make chim-bootrom-init + # Compile SoC in vsim + - make chim-sim + artifacts: + paths: [ "hw", "sw", "target/sim" ] + expire_in: 3 days + +vsim-test: + extends: .base + stage: test + needs: [ vsim-build ] + parallel: + matrix: + - TESTNAME: ${VSIM_TESTS} + script: + - make chim-run-batch BINARY=$BINARY_DIR/$TESTNAME.memisl.elf VSIM_FLAGS="-l $TESTNAME.transcript" + - ./scripts/vsim_ret_error.sh $TESTNAME.transcript + dependencies: + - vsim-build + artifacts: + paths: [ "hw", "sw", "target/sim" ] + exclude: [ "target/sim/vsim/work/**/*", "target/sim/vsim/work" ] + expire_in: 4 weeks diff --git a/.gitlab/gitlab-ci.yml b/.gitlab/gitlab-ci.yml deleted file mode 100644 index 3a35b47..0000000 --- a/.gitlab/gitlab-ci.yml +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2024 ETH Zurich and University of Bologna. -# Licensed under the Apache License, Version 2.0, see LICENSE for details. -# SPDX-License-Identifier: Apache-2.0 - -# Author: Sergio Mazzola - -# We initialize the nonfree repo, then spawn a sub-pipeline from it - -variables: - VSIM_TESTS: '["testCluster", "testClusterOffload", "testMemBypass", "testPeripheralsGating", "testHyperbusAddr", "testCfgBootAddr"]' - -stages: - - nonfree - -init: - stage: nonfree - script: make chim-nonfree-init - artifacts: - paths: [ nonfree/ci.yml ] - -process: - stage: nonfree - needs: [ init ] - script: - - envsubst '${VSIM_TESTS}' < nonfree/ci.yml > nonfree/processed_ci.yml - artifacts: - paths: [ nonfree/processed_ci.yml ] - -subpipe: - stage: nonfree - needs: [ process ] - trigger: - include: - - artifact: nonfree/processed_ci.yml - job: process - forward: - pipeline_variables: true - strategy: depend diff --git a/chimera.mk b/chimera.mk index 5e88a5e..f524823 100644 --- a/chimera.mk +++ b/chimera.mk @@ -74,17 +74,6 @@ regenerate_soc_regs: $(CHIM_ROOT)/hw/regs/chimera_reg_pkg.sv $(CHIM_ROOT)/hw/reg $(CHIM_ROOT)/hw/regs/chimera_reg_pkg.sv $(CHIM_ROOT)/hw/regs/chimera_reg_top.sv: $(CHIM_ROOT)/hw/regs/chimera_regs.hjson python $(CHIM_ROOT)/utils/reggen/regtool.py -r $< --outdir $(dir $@) - -# Nonfree components -CHIM_NONFREE_REMOTE ?= git@iis-git.ee.ethz.ch:pulp-restricted/chimera-nonfree.git -CHIM_NONFREE_DIR ?= $(CHIM_ROOT)/nonfree -CHIM_NONFREE_COMMIT ?= lleone/main-ci # to deploy `chimera-nonfree` repo changes, push to `deploy` tag - -.PHONY: chim-nonfree-init -chim-nonfree-init: - git clone $(CHIM_NONFREE_REMOTE) $(CHIM_NONFREE_DIR) - cd $(CHIM_NONFREE_DIR) && git checkout $(CHIM_NONFREE_COMMIT) - -include $(CHIM_NONFREE_DIR)/nonfree.mk -include $(CHIM_ROOT)/bender.mk From 58bf06f6d48e71c50cd88cbb99305d423d779b6d Mon Sep 17 00:00:00 2001 From: Lorenzo Leone Date: Thu, 12 Mar 2026 15:16:48 +0100 Subject: [PATCH 2/4] ci: Fix tests name vector --- .gitlab-ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a28b643..b6d55b8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,6 @@ variables: # Enable colors in CI terminal TERM: ansi FORCE_COLOR: 1 - VSIM_TESTS: '["testCluster", "testClusterOffload", "testMemBypass", "testPeripheralsGating", "testHyperbusAddr", "testCfgBootAddr"]' BINARY_DIR: ./sw/tests default: @@ -55,7 +54,13 @@ vsim-test: needs: [ vsim-build ] parallel: matrix: - - TESTNAME: ${VSIM_TESTS} + - TESTNAME: + - testCluster + - testClusterOffload + - testMemBypass + - testPeripheralsGating + - testHyperbusAddr + - testCfgBootAddr script: - make chim-run-batch BINARY=$BINARY_DIR/$TESTNAME.memisl.elf VSIM_FLAGS="-l $TESTNAME.transcript" - ./scripts/vsim_ret_error.sh $TESTNAME.transcript From 7b3d5b7c91c423339140f6a4c741376e63bc7c17 Mon Sep 17 00:00:00 2001 From: Lorenzo Leone Date: Thu, 12 Mar 2026 15:39:45 +0100 Subject: [PATCH 3/4] update gitlab action version --- .github/workflows/gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gitlab-ci.yml b/.github/workflows/gitlab-ci.yml index a49e802..95a3479 100644 --- a/.github/workflows/gitlab-ci.yml +++ b/.github/workflows/gitlab-ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check Gitlab CI - uses: pulp-platform/pulp-actions/gitlab-ci@v2 + uses: pulp-platform/pulp-actions/gitlab-ci@v2.4.4 # Skip on forks or pull requests from forks due to missing secrets. if: github.repository == 'pulp-platform/chimera' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) with: From 97840b1970cc9e4b24089be4b78388620a7f049a Mon Sep 17 00:00:00 2001 From: Lorenzo Leone Date: Thu, 12 Mar 2026 17:33:53 +0100 Subject: [PATCH 4/4] ci: Add bender deps stage --- .gitlab-ci.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6d55b8..2538140 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,11 +16,10 @@ default: before_script: # Install python virtual environment - source iis-env.sh - # Set up environment - - export PATH=$RISCV_GCC_BINROOT:$PATH - env stages: + - init - build - test @@ -29,6 +28,25 @@ stages: when: always expire_in: 1 week +init-deps: + extends: .base + stage: init + script: + # Check out the biggest bender dependencies serially + # to avoid rate limiting issues + - bender path cheshire + - bender path cva6 + - bender path axi + - bender path idma + - bender path snitch_cluster + - bender path memory_island + # Collect bender sourcess + - bender checkout + # bender checkout sometimes fails, + # due to rate limiting of github + retry: 1 + + vsim-build: extends: .base stage: build