Add a simple Makefile to wrap running dvsim for icache tests

This patch also includes a hacky test timeout. We'll remove this (or
at least make it bigger) when we start actually running data through
the tests, but this is handy for now because it means simulations
finish without having to pkill them.
This commit is contained in:
Rupert Swarbrick 2020-03-25 12:12:44 +00:00 committed by Rupert Swarbrick
parent ba9b137488
commit 754a8f3d09
2 changed files with 41 additions and 0 deletions

40
dv/uvm/icache/dv/Makefile Normal file
View file

@ -0,0 +1,40 @@
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
# Simple wrappers around dvsim.py to avoid needing long command lines. This
# doesn't do any dependency tracking (as you might expect in a Makefile) because
# the dvsim infrastructure doesn't support it.
# Set WAVES to 1 to get VPD/FSDB dumps
WAVES=0
# Set VERBOSITY to a nonempty string and it will be passed to dvsim with the
# --verbosity parameter, overriding whatever was set in the hjson file.
VERBOSITY=
# Specify the seed for the test to run. If this is empty, dvsim.py will pick
# random seeds. By default, we make runs reproducible, so force the seed.
SEED=1
ibex-top := ../../../..
dvsim-py := $(ibex-top)/vendor/lowrisc_ip/dvsim/dvsim.py
dvsim-std-args := --skip-ral --scratch-root $(ibex-top)/build -v h
waves-arg := $(if $(filter-out 0,$(WAVES)),--waves,)
verbosity-arg := $(if $(VERBOSITY),--verbosity $(VERBOSITY),)
seed-arg := $(if $(SEED),--fixed-seed $(SEED),)
dvsim-mk-args := $(waves-arg) $(verbosity-arg) $(seed-arg)
run-dvsim := $(dvsim-py) $(dvsim-std-args) $(dvsim-mk-args)
.PHONY: all
all: run
.PHONY: just-build
just-build:
$(run-dvsim) --build-only ibex_icache_sim_cfg.hjson
.PHONY: run
run:
$(run-dvsim) ibex_icache_sim_cfg.hjson

View file

@ -42,6 +42,7 @@
{
name: ibex_icache_sanity
uvm_test_seq: ibex_icache_sanity_vseq
run_opts: ["+test_timeout_ns=10000"]
}
// TODO: add more tests here