@@ -106,53 +106,40 @@ sim-vsim:
106106 - .init-env
107107 - .sw-tests
108108 variables :
109- LOG_FILE : target/sim/vsim/ transcript
109+ LOG_FILE : transcript
110110 needs :
111111 - chs-sw
112112 - sn-sw
113113 - vsim-compile
114114 script :
115- # Run the simulation
116115 - make vsim-run-batch-verify
117- # Check either success or failure for non-zero exit codes
118- - ' if [ -z "${NZ_EXIT_CODE}" ]; then grep "] SUCCESS" transcript || (exit 1); else grep "] FAILED: return code ${NZ_EXIT_CODE}" transcript || (exit 1); fi'
119- # Check for UART output
120- - ' if [ ! -z "${USTR}" ]; then (grep " \[UART\] ${USTR}" transcript); fi'
121- # Check for any fatal errors
122- - ' if grep "Fatal:" transcript; then exit 1; fi'
123- # Check for any non-fatal errors. One and only one error is expected with a non-zero exit code.
124- # Ignore all errors when using a separate verification script.
125- - ' if [ -z "${VERIFY_PY}" ]; then if [ ! -z "${NZ_EXIT_CODE}" ]; then count=$(grep -c "Error:" transcript); if [ "$count" -ne 1 ]; then exit 1; fi; else if grep -q "Error:" transcript; then exit 1; fi; fi; fi'
116+ - !reference [.check-simulation, script]
126117 artifacts :
127118 paths :
128- - transcript
119+ - ${LOG_FILE}
129120
130121sim-vcs :
131122 stage : run
132123 extends :
133124 - .cache-deps
134125 - .init-env
135- - .sw-tests
136126 variables :
137- LOG_FILE : target/sim/vcs/build/vcs.log
127+ LOG_FILE : transcript
128+ CHS_BINARY : sw/cheshire/tests/simple_offload.spm.elf
129+ SN_BINARY : sw/snitch/apps/mha/build/mha.elf
130+ VERIFY_PY : .deps/snitch_cluster/sw/kernels/dnn/mha/scripts/verify.py
131+ PRELMODE : 3
138132 needs :
139133 - chs-sw
140134 - sn-sw
141135 - vcs-compile
142136 script :
143- # Run the simulation
144- - make vcs-run-batch-verify 2>&1 | tee target/sim/vcs/build/vcs.log
145- # Check either success or failure for non-zero exit codes
146- - ' if [ -z "${NZ_EXIT_CODE}" ]; then grep "] SUCCESS" target/sim/vcs/build/vcs.log || (exit 1); else grep "] FAILED: return code ${NZ_EXIT_CODE}" target/sim/vcs/build/vcs.log || (exit 1); fi'
147- # Check for UART output
148- - ' if [ ! -z "${USTR}" ]; then (grep "\[UART\] ${USTR}" target/sim/vcs/build/vcs.log); fi'
149- # Check for any fatal errors
150- - ' if grep "Fatal:" target/sim/vcs/build/vcs.log; then exit 1; fi'
151- # Check for any non-fatal errors
152- - ' if [ -z "${VERIFY_PY}" ]; then if [ ! -z "${NZ_EXIT_CODE}" ]; then count=$(grep -c "Error:" target/sim/vcs/build/vcs.log); if [ "$count" -ne 1 ]; then exit 1; fi; else if grep -q "Error:" target/sim/vcs/build/vcs.log; then exit 1; fi; fi; fi'
137+ # Run the VCS simulation and capture the console output into a log file
138+ - make vcs-run-batch-verify 2>&1 | tee ${LOG_FILE}
139+ - !reference [.check-simulation, script]
153140 artifacts :
154141 paths :
155- - target/sim/vcs/build/vcs.log
142+ - ${LOG_FILE}
156143
157144# ####################
158145# Run Experiments #
0 commit comments