Add serpent cache tests to CI script

This commit is contained in:
Michael Schaffner 2018-09-06 16:33:24 +02:00
parent 93a0c31faa
commit 38c3114c32
No known key found for this signature in database
GPG key ID: 7AA09AE049819C2C
4 changed files with 111 additions and 20 deletions

View file

@ -22,56 +22,116 @@ variables:
stages:
- build
- test
- test_std
- test_serpent
###################################
# prepare
build:
stage: build
script:
- ci/install-fesvr.sh
- ci/build-riscv-tests.sh
- make clean
- make build questa_version=$QUESTASIM_VERSION
- make verilate verilator=$VERILATOR_ROOT/bin/verilator
artifacts:
paths:
- tmp
###################################
# tests with standard cache system
# rv64ui-p-* and rv64ui-v-* tests
run-asm-tests-questa:
stage: test
asm-quest:
stage: test_std
script:
- make -j${NUM_JOBS} run-asm-tests questa_version=$QUESTASIM_VERSION
dependencies:
- build
run-benchmarks-questa:
stage: test
bench-quest:
stage: test_std
script:
- make -j${NUM_JOBS} run-benchmarks questa_version=$QUESTASIM_VERSION
dependencies:
- build
# rv64ui-p-* tests
run-asm-tests1-verilator:
stage: test
asm1-ver:
stage: test_std
script:
- make -j${NUM_JOBS} run-asm-tests1-verilator verilator=$VERILATOR_ROOT/bin/verilator
dependencies:
- build
# rv64ui-v-* tests
run-asm-tests2-verilator:
stage: test
asm2-ver:
stage: test_std
script:
- make -j${NUM_JOBS} run-asm-tests2-verilator verilator=$VERILATOR_ROOT/bin/verilator
dependencies:
- build
run-benchmarks-verilator:
stage: test
bench-ver:
stage: test_std
script:
- make -j${NUM_JOBS} run-benchmarks-verilator verilator=$VERILATOR_ROOT/bin/verilator
dependencies:
- build
###################################
# tests with serpent cache system
# rv64ui-p-* and rv64ui-v-* tests
serp-asm-quest:
stage: test_serpent
script:
- make -j${NUM_JOBS} run-asm-tests questa_version=$QUESTASIM_VERSION define=SERPENT_PULP+AXI64_CACHE_PORTS
dependencies:
- build
serp-bench-quest:
stage: test_serpent
script:
- make -j${NUM_JOBS} run-benchmarks questa_version=$QUESTASIM_VERSION define=SERPENT_PULP+AXI64_CACHE_PORTS
dependencies:
- build
# rv64ui-p-* tests
serp-asm1-ver:
stage: test_serpent
script:
- make -j${NUM_JOBS} run-asm-tests1-verilator verilator=$VERILATOR_ROOT/bin/verilator define=SERPENT_PULP+AXI64_CACHE_PORTS
dependencies:
- build
# rv64ui-v-* tests
serp-asm2-ver:
stage: test_serpent
script:
- make -j${NUM_JOBS} run-asm-tests2-verilator verilator=$VERILATOR_ROOT/bin/verilator define=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 define=SERPENT_PULP+AXI64_CACHE_PORTS
dependencies:
- build
serp-icache-quest:
stage: test_serpent
script:
- cd tb/tb_serpent_icache/
- make simc
- "grep 'CI: PASSED' summary.rep"
dependencies:
- build

View file

@ -84,6 +84,33 @@ jobs:
- ci/install-fesvr.sh
- ci/build-riscv-tests.sh
- make -j${NUM_JOBS} run-asm-tests2-verilator verilator=$VERILATOR_ROOT/bin/verilator
- stage: test
name: run riscv benchmarks
script:
- ci/install-fesvr.sh
- ci/build-riscv-tests.sh
- make -j${NUM_JOBS} run-benchmarks-verilator verilator=$VERILATOR_ROOT/bin/verilator define=SERPENT_PULP+AXI64_CACHE_PORTS
# rv64ui-p-* tests
- stage: test
name: run rv64ui-p-* asm tests
script:
- ci/install-fesvr.sh
- ci/build-riscv-tests.sh
- make -j${NUM_JOBS} run-asm-tests1-verilator verilator=$VERILATOR_ROOT/bin/verilator define=SERPENT_PULP+AXI64_CACHE_PORTS
# rv64ui-v-* tests
- stage: test
name: run rv64ui-v-* asm tests
script:
- ci/install-fesvr.sh
- ci/build-riscv-tests.sh
- make -j${NUM_JOBS} run-asm-tests2-verilator verilator=$VERILATOR_ROOT/bin/verilator define=SERPENT_PULP+AXI64_CACHE_PORTS
# extra time during long builds
install: travis_wait

View file

@ -17,6 +17,8 @@ questa_version ?= ${QUESTASIM_VERSION}
verilator ?= verilator
# traget option
target-options ?=
# additional defines
define ?=
# Sources
# Package files -> compile first
ariane_pkg := include/riscv_pkg.sv \
@ -81,7 +83,7 @@ failed-tests := $(wildcard failedtests/*.S)
# Search here for include files (e.g.: non-standalone components)
incdir := ./includes
# Compile and sim flags
compile_flag += +cover=bcfst+/dut -incr -64 -nologo -quiet -suppress 13262 -permissive
compile_flag += +cover=bcfst+/dut -incr -64 -nologo -quiet -suppress 13262 -permissive +define+$(define)
uvm-flags += +UVM_NO_RELNOTES
# Iterate over all include directories and write them with +incdir+ prefixed
# +incdir+ works for Verilator and QuestaSim
@ -165,8 +167,9 @@ check-benchmarks:
verilate_command := $(verilator) \
$(ariane_pkg) \
$(filter-out tb/ariane_bt.sv,$(src)) \
+define+$(define) \
src/util/sram.sv \
+incdir+src/axi_node \
+incdir+src/axi_node \
--unroll-count 256 \
-Werror-PINMISSING \
-Werror-IMPLICIT \

View file

@ -409,17 +409,18 @@ assign exp_pop = (dreq_o.valid | dreq_i.kill_s2) & (~exp_empty);
n++;
// wait for stimuli application end
acqWait(clk_i, stim_end);
acqWaitCyc(clk_i,10);
acqWaitCyc(clk_i,100);
end
///////////////////////////////////////////////
acqWait(clk_i,end_of_sim);
status.printToFile("summary.rep", 1);
if(status.totErrCnt == 0) begin
$display("TB: ----------------------------------------------------------------------\n");
$display("TB: PASSED %0d VECTORS", status.totAcqCnt);
$display("TB: ----------------------------------------------------------------------\n");
end else begin
$display("TB: ----------------------------------------------------------------------\n");
$display("TB: FAILED %0d OF %0d VECTORS\n", status.totErrCnt, status.totAcqCnt);
$display("TB: failing tests:");
$display("%s", failingTests);