Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sim] add simulation check to sw makefiles as target 'sim-check' #817

Merged
merged 2 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Processor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: '🚧 Run Processor Hardware Tests with shell script'
uses: docker://ghcr.io/stnolting/neorv32/sim
with:
args: ./sim/simple/ghdl.sh
args: make -C sw/example/processor_check sim-check


VUnit-Container:
Expand Down
3 changes: 0 additions & 3 deletions sim/simple/ghdl.run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,3 @@ if [ -n "$GHDL_DEVNULL" ]; then
else
$runcmd
fi

# verify results of processor check: sw/example/processor_check
cat neorv32.uart0.sim_mode.text.out | grep "PROCESSOR TEST COMPLETED SUCCESSFULLY!"
3 changes: 3 additions & 0 deletions sw/example/hello_world/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
NEORV32_HOME ?= ../../..

include $(NEORV32_HOME)/sw/common/common.mk

sim-check: sim
cat $(NEORV32_HOME)/sim/simple/neorv32.uart0.sim_mode.text.out | grep "Hello world! :)"
3 changes: 3 additions & 0 deletions sw/example/processor_check/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
NEORV32_HOME ?= ../../..

include $(NEORV32_HOME)/sw/common/common.mk

sim-check: sim
cat $(NEORV32_HOME)/sim/simple/neorv32.uart0.sim_mode.text.out | grep "PROCESSOR TEST COMPLETED SUCCESSFULLY!"
2 changes: 1 addition & 1 deletion sw/example/processor_check/run_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set -e

echo "Starting processor check simulation..."
make USER_FLAGS+="-DUART0_SIM_MODE -DUART1_SIM_MODE -g -flto" EFFORT=-Os MARCH=rv32ima_zba_zbb_zbc_zbs_zicsr_zifencei_zicond clean_all all sim
make USER_FLAGS+="-DUART0_SIM_MODE -DUART1_SIM_MODE -g -flto" EFFORT=-Os MARCH=rv32ima_zba_zbb_zbc_zbs_zicsr_zifencei_zicond clean_all all sim-check