diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9eed4e489..d1102802f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,14 +47,14 @@ build: asm-quest: stage: test_std script: - - make -j${NUM_JOBS} run-asm-tests questa_version=$QUESTASIM_VERSION + - make -j${NUM_JOBS} run-asm-tests dependencies: - build bench-quest: stage: test_std script: - - make -j${NUM_JOBS} run-benchmarks questa_version=$QUESTASIM_VERSION + - make -j${NUM_JOBS} run-benchmarks dependencies: - build @@ -62,7 +62,7 @@ bench-quest: asm1-ver: 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 @@ -70,14 +70,14 @@ asm1-ver: asm2-ver: 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 bench-ver: 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 @@ -96,14 +96,14 @@ torture: serp-asm-quest: stage: test_serpent script: - - make -j${NUM_JOBS} run-asm-tests questa_version=$QUESTASIM_VERSION defines=SERPENT_PULP+AXI64_CACHE_PORTS + - make -j${NUM_JOBS} run-asm-tests defines=SERPENT_PULP+AXI64_CACHE_PORTS dependencies: - build serp-bench-quest: stage: test_serpent script: - - make -j${NUM_JOBS} run-benchmarks questa_version=$QUESTASIM_VERSION defines=SERPENT_PULP+AXI64_CACHE_PORTS + - make -j${NUM_JOBS} run-benchmarks defines=SERPENT_PULP+AXI64_CACHE_PORTS dependencies: - build @@ -111,7 +111,7 @@ serp-bench-quest: serp-asm1-ver: stage: test_serpent script: - - make -j${NUM_JOBS} run-asm-tests1-verilator verilator=$VERILATOR_ROOT/bin/verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS + - make -j${NUM_JOBS} run-asm-tests1-verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS dependencies: - build @@ -119,14 +119,14 @@ serp-asm1-ver: serp-asm2-ver: stage: test_serpent script: - - make -j${NUM_JOBS} run-asm-tests2-verilator verilator=$VERILATOR_ROOT/bin/verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS + - make -j${NUM_JOBS} run-asm-tests2-verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS dependencies: - build serp-bench-ver: stage: test_serpent script: - - make -j${NUM_JOBS} run-benchmarks-verilator verilator=$VERILATOR_ROOT/bin/verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS + - make -j${NUM_JOBS} run-benchmarks-verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS dependencies: - build diff --git a/.travis.yml b/.travis.yml index 9c577bfef..80bc22f1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,26 +67,27 @@ 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 @@ -94,25 +95,25 @@ jobs: - ci/get-torture.sh - make clean - make torture-gen - - make torture-rtest-verilator verilator=$VERILATOR_ROOT/bin/verilator + - make torture-rtest-verilator - stage: test name: run riscv benchmarks (serpent) script: - ci/build-riscv-tests.sh - - make -j${NUM_JOBS} run-benchmarks-verilator verilator=$VERILATOR_ROOT/bin/verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS + - make -j${NUM_JOBS} run-benchmarks-verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS # rv64ui-p-* tests - stage: test name: run asm tests1 (serpent) script: - ci/build-riscv-tests.sh - - make -j${NUM_JOBS} run-asm-tests1-verilator verilator=$VERILATOR_ROOT/bin/verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS + - make -j${NUM_JOBS} run-asm-tests1-verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS # rv64ui-v-* tests - stage: test name: run asm tests2 (serpent) script: - ci/build-riscv-tests.sh - - make -j${NUM_JOBS} run-asm-tests2-verilator verilator=$VERILATOR_ROOT/bin/verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS + - make -j${NUM_JOBS} run-asm-tests2-verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS - stage: test name: run torture (serpent) @@ -120,7 +121,7 @@ jobs: - ci/get-torture.sh - make clean - make torture-gen defines=SERPENT_PULP+AXI64_CACHE_PORTS - - make torture-rtest-verilator verilator=$VERILATOR_ROOT/bin/verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS + - make torture-rtest-verilator defines=SERPENT_PULP+AXI64_CACHE_PORTS diff --git a/Makefile b/Makefile index 59b6f17c8..cf2b12fa7 100755 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ ariane_pkg := include/riscv_pkg.sv \ include/ariane_pkg.sv \ include/std_cache_pkg.sv \ include/serpent_cache_pkg.sv \ - include/axi_if.sv + include/axi_if.sv # utility modules util := $(wildcard src/util/*.svh) \ @@ -200,7 +200,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 @@ -234,8 +234,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} \ @@ -247,16 +247,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