diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7fe15f55d..97f8d30ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,14 +41,14 @@ build: run-asm-tests-questa: stage: test_std script: - - make -j${NUM_JOBS} run-asm-tests questa_version=$QUESTASIM_VERSION + - make -j${NUM_JOBS} run-asm-tests dependencies: - build run-benchmarks-questa: stage: test_std script: - - make -j${NUM_JOBS} run-benchmarks questa_version=$QUESTASIM_VERSION + - make -j${NUM_JOBS} run-benchmarks dependencies: - build @@ -56,7 +56,7 @@ run-benchmarks-questa: run-asm-tests1-verilator: stage: test_std script: - - make -j${NUM_JOBS} run-asm-tests1-verilator verilator=$VERILATOR_ROOT/bin/verilator + - make -j${NUM_JOBS} run-asm-tests1-verilator dependencies: - build @@ -64,14 +64,14 @@ run-asm-tests1-verilator: run-asm-tests2-verilator: stage: test_std script: - - make -j${NUM_JOBS} run-asm-tests2-verilator verilator=$VERILATOR_ROOT/bin/verilator + - make -j${NUM_JOBS} run-asm-tests2-verilator dependencies: - build run-benchmarks-verilator: stage: test_std script: - - make -j${NUM_JOBS} run-benchmarks-verilator verilator=$VERILATOR_ROOT/bin/verilator + - make -j${NUM_JOBS} run-benchmarks-verilator dependencies: - build diff --git a/.travis.yml b/.travis.yml index c05a179c6..f98b7a682 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,33 +67,34 @@ jobs: - stage: compile2 name: build tools script: - - ci/install-verilator.sh - ci/install-fesvr.sh + - ci/install-verilator.sh - ci/install-dtc.sh + - ci/install-spike.sh - stage: test name: run riscv benchmarks script: - ci/build-riscv-tests.sh - - make -j${NUM_JOBS} run-benchmarks-verilator verilator=$VERILATOR_ROOT/bin/verilator + - make -j${NUM_JOBS} run-benchmarks-verilator # rv64ui-p-* tests - stage: test name: run asm tests1 script: - ci/build-riscv-tests.sh - - make -j${NUM_JOBS} run-asm-tests1-verilator verilator=$VERILATOR_ROOT/bin/verilator + - make -j${NUM_JOBS} run-asm-tests1-verilator # rv64ui-v-* tests - stage: test name: run asm tests2 script: - ci/build-riscv-tests.sh - - make -j${NUM_JOBS} run-asm-tests2-verilator verilator=$VERILATOR_ROOT/bin/verilator + - make -j${NUM_JOBS} run-asm-tests2-verilator - stage: test name: run torture script: - ci/get-torture.sh - make clean - make torture-gen - - make torture-rtest-verilator verilator=$VERILATOR_ROOT/bin/verilator + - make torture-rtest-verilator # extra time during long builds install: travis_wait diff --git a/Makefile b/Makefile index 3617a04f4..7595da754 100755 --- a/Makefile +++ b/Makefile @@ -199,7 +199,7 @@ verilate_command := $(verilator) --exe tb/ariane_tb.cpp tb/dpi/SimDTM.cc tb/dpi/SimJTAG.cc tb/dpi/remote_bitbang.cc # User Verilator, at some point in the future this will be auto-generated -verilate: $(dpi-library)/ariane_dpi.so +verilate: $(verilate_command) cd $(ver-library) && make -j${NUM_JOBS} -f Variane_testharness.mk @@ -233,8 +233,8 @@ torture-rtest: build torture-rtest-verilator: verilate cd $(riscv-torture-dir) && printf "#!/bin/sh\ncd $(root-dir) && make run-torture-verilator defines=$(defines)" > call.sh && chmod +x call.sh - cd $(riscv-torture-dir) && $(riscv-torture-bin) 'testrun/run -r ./call.sh -a output/test.S' | tee output/test-verilator.log - make check-torture-verilator + cd $(riscv-torture-dir) && $(riscv-torture-bin) 'testrun/run -r ./call.sh -a output/test.S' | tee output/test.log + make check-torture run-torture: build vsim${questa_version} +permissive -64 -c -lib ${library} +max-cycles=$(max_cycles)+UVM_TESTNAME=${test_case} \ @@ -246,16 +246,12 @@ run-torture: build +signature=$(riscv-torture-dir)/output/test.rtlsim.sig ++$(riscv-torture-dir)/output/test ++$(target-options) run-torture-verilator: verilate - $(ver-library)/Variane_testharness +max-cycles=$(max_cycles) +signature=$(riscv-torture-dir)/output/test.rtlsim.verilator.sig $(riscv-torture-dir)/output/test + $(ver-library)/Variane_testharness +max-cycles=$(max_cycles) +signature=$(riscv-torture-dir)/output/test.rtlsim.sig $(riscv-torture-dir)/output/test check-torture: grep 'All signatures match for output/test' $(riscv-torture-dir)/output/test.log diff -s $(riscv-torture-dir)/output/test.spike.sig $(riscv-torture-dir)/output/test.rtlsim.sig -check-torture-verilator: - grep 'All signatures match for output/test' $(riscv-torture-dir)/output/test-verilator.log - diff -s $(riscv-torture-dir)/output/test.spike.sig $(riscv-torture-dir)/output/test.rtlsim.verilator.sig - clean: rm -rf $(riscv-torture-dir)/output/test* rm -rf $(library)/ $(dpi-library)/ $(ver-library)/ diff --git a/ci/gitlab-ci-emul.sh b/ci/gitlab-ci-emul.sh index a96b5ba00..1417d89ca 100755 --- a/ci/gitlab-ci-emul.sh +++ b/ci/gitlab-ci-emul.sh @@ -40,13 +40,13 @@ make clean make torture-gen # run asm tests on verilator -make -j${NUM_JOBS} verilate verilator=$VERILATOR_ROOT/bin/verilator -make -j${NUM_JOBS} run-asm-tests-verilator verilator=$VERILATOR_ROOT/bin/verilator -make -j${NUM_JOBS} run-benchmarks-verilator verilator=$VERILATOR_ROOT/bin/verilator -make -j${NUM_JOBS} torture-rtest-verilator verilator=$VERILATOR_ROOT/bin/verilator +make -j${NUM_JOBS} verilate +make -j${NUM_JOBS} run-asm-tests-verilator +make -j${NUM_JOBS} run-benchmarks-verilator +make -j${NUM_JOBS} torture-rtest-verilator # run asm tests on questa -make -j${NUM_JOBS} build questa_version=$QUESTASIM_VERSION -make -j${NUM_JOBS} run-asm-tests questa_version=$QUESTASIM_VERSION -make -j${NUM_JOBS} run-benchmarks questa_version=$QUESTASIM_VERSION -make -j${NUM_JOBS} torture-rtest questa_version=$QUESTASIM_VERSION +make -j${NUM_JOBS} build +make -j${NUM_JOBS} run-asm-tests +make -j${NUM_JOBS} run-benchmarks +make -j${NUM_JOBS} torture-rtest diff --git a/ci/travis-ci-emul.sh b/ci/travis-ci-emul.sh index 4add9271a..bb6d9df22 100644 --- a/ci/travis-ci-emul.sh +++ b/ci/travis-ci-emul.sh @@ -40,7 +40,7 @@ make clean make torture-gen # run asm tests on verilator -make -j${NUM_JOBS} verilate verilator=$VERILATOR_ROOT/bin/verilator -make -j${NUM_JOBS} run-asm-tests-verilator verilator=$VERILATOR_ROOT/bin/verilator -make -j${NUM_JOBS} run-benchmarks-verilator verilator=$VERILATOR_ROOT/bin/verilator -make -j${NUM_JOBS} torture-rtest-verilator verilator=$VERILATOR_ROOT/bin/verilator +make -j${NUM_JOBS} verilate +make -j${NUM_JOBS} run-asm-tests-verilator +make -j${NUM_JOBS} run-benchmarks-verilator +make -j${NUM_JOBS} torture-rtest-verilator