Add support for running Icache test with Riviera-PRO

This commit is contained in:
Dawid Zimonczyk 2020-05-12 09:22:58 +02:00 committed by Philipp Wagner
parent b95ff21c28
commit d51b50350f
3 changed files with 99 additions and 1 deletions

View file

@ -0,0 +1,83 @@
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
{
build_cmd: "vlib work && {job_prefix} vlog"
run_cmd: "{job_prefix} vsim"
// Indicate the tool specific helper sources - these are copied over to the
// {tool_srcs_dir} before running the simulation.
tool_srcs: ["{proj_root}/dv/uvm/data/riviera/*"]
build_opts: ["-sv",
"-timescale 1ns/1ps",
"-uvmver 1.2",
"-f {sv_flist}"]
run_opts: ["-sv_seed={seed}",
"-c",
"{tb}",
"-lib {sv_flist_gen_dir}/work",
"+UVM_TESTNAME={uvm_test}",
"+UVM_TEST_SEQ={uvm_test_seq}",
"-do {tool_srcs_dir}/riviera_run.do"]
// Coverage related.
// TODO: These options have to be filled in.
cov_db_dir: ""
// Individual test specific coverage data - this will be deleted if the test fails
// so that coverage from failiing tests is not included in the final report.
cov_db_test_dir_name: "{run_dir_name}.{seed}"
cov_db_test_dir: ""
// Merging coverage.
// "cov_db_dirs" is a special variable that appends all build directories in use.
// It is constructed by the tool itself.
cov_merge_dir: "{scratch_base_path}/cov_merge"
cov_merge_db_dir: ""
cov_merge_cmd: ""
cov_merge_opts: []
// Generate covreage reports in text as well as html.
cov_report_dir: "{scratch_base_path}/cov_report"
cov_report_cmd: ""
cov_report_opts: []
cov_report_dashboard: ""
// Analyzing coverage - this is done by invoking --cov-analyze switch. It opens up the
// GUI for visual analysis.
cov_analyze_dir: "{scratch_base_path}/cov_analyze"
cov_analyze_cmd: ""
cov_analyze_opts: []
// pass and fail patterns
build_fail_patterns: ["\\*E.*$"]
run_fail_patterns: ["\\*E.*$"] // Null pointer error
build_modes: [
{
name: riviera_waves
is_sim_mode: 1
}
// TODO support coverage for riviera
{
name: riviera_cov
is_sim_mode: 1
build_opts: []
run_opts: []
}
// TODO support profiling for riviera
{
name: riviera_profile
is_sim_mode: 1
build_opts: []
run_opts: []
}
{
name: riviera_xprop
is_sim_mode: 1
build_opts: []
}
]
}

View file

@ -0,0 +1,11 @@
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
# Do not print "KERNEL: " in front of messages to ensure user-printed messages
# match the filter expected by the DV environment.
unset messageprefix
pref.setvalue application/console/general/show-identifier-in-messages false
run -all
endsim
pref.setvalue application/console/general/show-identifier-in-messages true

View file

@ -20,10 +20,13 @@ VERBOSITY=
# random seeds. By default, we make runs reproducible, so force the seed.
SEED=1
#SIMULATOR
SIMULATOR=vcs
ibex-top := ../../../..
scratch-root := $(ibex-top)/build
dvsim-py := $(ibex-top)/vendor/lowrisc_ip/dvsim/dvsim.py
dvsim-std-args := --scratch-root $(scratch-root)
dvsim-std-args := --scratch-root $(scratch-root) --tool $(SIMULATOR)
waves-arg := $(if $(filter-out 0,$(WAVES)),--waves,)
coverage-arg := $(if $(filter-out 0,$(COVERAGE)),-c,)
@ -33,6 +36,7 @@ seed-arg := $(if $(SEED),--fixed-seed $(SEED),)
dvsim-mk-args := $(waves-arg) $(coverage-arg) $(verbosity-arg) $(seed-arg)
run-icache-dvsim := $(dvsim-py) ibex_icache_sim_cfg.hjson $(dvsim-std-args) $(dvsim-mk-args)
.PHONY: all
all: run