@@ -8,29 +8,32 @@ variables:
88 GIT_SUBMODULE_STRATEGY : none
99 ROOT_DIR : ' $CI_PROJECT_DIR'
1010 APPS : " tests"
11- PATH : ' /home/gitlabci/ .cargo/bin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/condor/bin:/usr/sepp/bin:$CI_PROJECT_DIR/install/verilator/bin:/home/gitlabci /.local/bin'
11+ PATH : ' $HOME/ .cargo/bin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/condor/bin:/usr/sepp/bin:$CI_PROJECT_DIR/install/verilator/bin:$HOME /.local/bin'
1212 OBJCACHE : ' '
1313 CC : ' /usr/pack/gcc-11.2.0-af/linux-x64/bin/gcc'
1414 CXX : ' /usr/pack/gcc-11.2.0-af/linux-x64/bin/g++'
1515 CMAKE : ' cmake-3.28.3'
1616 python : ' python3'
1717 python3 : ' python3'
18+ # Config to build and test
19+ CI_CONFIG : ' cachepool_fpu_2g'
20+ SW_PREFIX : ' test-cachepool-'
1821
1922default :
20- tags : [dolent ]
23+ tags : [shared ]
2124
2225stages :
2326 - build
27+ - test
2428
25- .base :
26- artifacts :
27- when : always
28- expire_in : 1 day
29-
30- build-vsim :
31- extends : .base
29+ # ---------------------------------------------------------------------------
30+ # Build stage: compile RTL and software for CI_CONFIG.
31+ # Parallel jobs within the same pipeline share $HOME, so the toolchain
32+ # installed by make quick-tool is automatically available to all test jobs.
33+ # ---------------------------------------------------------------------------
34+ build :
3235 stage : build
33- timeout : 5h
36+ timeout : 4h 30m
3437 script :
3538 - echo "Using CC=$CC"
3639 - echo "Using CXX=$CXX"
@@ -39,10 +42,57 @@ build-vsim:
3942 - make quick-tool
4043 - make init
4144 - make dram-build
42- - cd util/auto-benchmark
43- - chmod +x ./run_ci.sh
44- - ./run_ci.sh
45+ - python3 -m pip install --quiet -r requirements.txt
46+ - make clean generate vsim config=$CI_CONFIG
47+ artifacts :
48+ when : always
49+ expire_in : 1 day
50+ paths :
51+ # QuestaSim compiled work library
52+ - sim/work/
53+ # vsim wrapper scripts (exclude sim/bin/logs/ — not needed by test jobs)
54+ - sim/bin/cachepool_cluster.vsim
55+ - sim/bin/cachepool_cluster.vsim.gui
56+ # DPI shared library
57+ - sim/work-dpi/
58+ # Software binaries for all kernels
59+ - software/build/CachePoolTests/
60+ # DRAMSys shared libraries and config files (referenced by vsim at runtime)
61+ - hardware/deps/dram_rtl_sim/dramsys_lib/DRAMSys/build/lib/
62+ - hardware/deps/dram_rtl_sim/dramsys_lib/DRAMSys/configs/
4563
64+ # ---------------------------------------------------------------------------
65+ # Test stage: run each kernel in parallel on a separate runner.
66+ # Each job downloads the build artifacts, runs one simulation, and checks
67+ # the output log for failures.
68+ # ---------------------------------------------------------------------------
69+ test :
70+ stage : test
71+ timeout : 1h
72+ needs : [build]
73+ parallel :
74+ matrix :
75+ - KERNEL :
76+ - spin-lock
77+ - load-store_M16
78+ - fdotp-32b_M32768
79+ - gemv_M512_N128_K32
80+ - fmatmul-32b_M64_N64_K64
81+ - fft-32b_M1024_N16
82+ - multi_producer_single_consumer_double_linked_list_M1_N1350_K10
83+ - byte-enable
84+ script :
85+ # The vsim script writes a .rtlbinary marker here; ensure the dir exists.
86+ - mkdir -p sim/bin/logs
87+ - chmod +x sim/bin/cachepool_cluster.vsim
88+ - BIN="${SW_PREFIX}${KERNEL}"
89+ - sim/bin/cachepool_cluster.vsim software/build/CachePoolTests/$BIN 2>&1 | tee test_${KERNEL}.log
90+ - python3 util/auto-benchmark/check-ci.py test_${KERNEL}.log
4691 artifacts :
92+ when : always
93+ expire_in : 1 day
4794 paths :
48- - util/auto-benchmark/logs
95+ # Full simulation log
96+ - test_*.log
97+ # Performance-monitor trace files written by the simulator
98+ - sim/bin/logs/
0 commit comments