blob: ba74942e773b7dd31ac94c73e399307896fd662b [file] [log] [blame]
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
{
// Name of the sim cfg - typically same as the name of the DUT.
name:
otbn
// Top level dut name (sv module).
dut: otbn
// Top level testbench name (sv module).
tb: tb
// Simulator used to sign off this block
tool: vcs
// Fusesoc core file used for building the file list.
fusesoc_core: lowrisc:dv:otbn_sim:0.1
// Testplan hjson file.
testplan: "{proj_root}/hw/ip/otbn/data/otbn_testplan.hjson"
exports: [
{ REPO_TOP: "{proj_root}" },
]
// Import additional common sim cfg files.
// TODO: remove imported cfgs that do not apply.
import_cfgs: [
// Project wide common sim cfg file
"{proj_root}/hw/dv/tools/dvsim/common_sim_cfg.hjson",
// Config files to get the correct flags for otbn_memutil and otbn_tracer
"{proj_root}/hw/ip/otbn/dv/memutil/otbn_memutil_sim_opts.hjson",
"{proj_root}/hw/ip/otbn/dv/tracer/otbn_tracer_sim_opts.hjson",
// Common CIP test lists
"{proj_root}/hw/dv/tools/dvsim/tests/csr_tests.hjson",
"{proj_root}/hw/dv/tools/dvsim/tests/mem_tests.hjson",
"{proj_root}/hw/dv/tools/dvsim/tests/intr_test.hjson",
"{proj_root}/hw/dv/tools/dvsim/tests/tl_access_tests.hjson"
]
// Add options needed to compile against otbn_memutil and otbn_tracer
en_build_modes: ["{tool}_otbn_memutil_build_opts",
"{tool}_otbn_tracer_build_opts"]
// Add additional tops for simulation.
sim_tops: ["otbn_bind"]
// Default iterations for all tests - each test entry can override this.
//
// TODO: This is set to one at the moment so things run quickly while we're
// bringing stuff up. It will need a more sensible value when we start
// testing seriously.
reseed: 1
// Default UVM test and seq class name.
uvm_test: otbn_base_test
uvm_test_seq: otbn_base_vseq
// The default place to find and build ELF binaries. If you have
// some pre-built binaries, you can run the simulation with them by using
// --run-opts to override the otbn_elf_dir plusarg in run_opts.
otbn_elf_dir: "{run_dir}/otbn-binaries"
run_opts: ["+otbn_elf_dir={otbn_elf_dir}"]
// A default build mode, used for the tests explicitly listed below. This
// runs meson to set up a .env file, needed by gen-binaries.py to find a
// toolchain. This isn't needed for things like the automated CSR tests, and
// they won't use it because they build in a different mode anyway.
//
// This step could run either as a pre-build command or a post-build command.
// Since it's much quicker than the SV build, we do it first so that you get
// a quick result if something has gone wrong.
build_modes: [
{
name: default
pre_build_cmds: ["cd {proj_root} && BUILD_ROOT={build_dir} ./meson_init.sh"]
}
]
gen_binaries: "{proj_root}/hw/ip/otbn/dv/uvm/gen-binaries.py"
otbn_obj_dir: "{build_dir}/build-out"
run_modes: [
// A run mode that runs the random instruction generator and builds the
// resulting binaries in {otbn_elf_dir}. If you override the otbn_elf_dir
// plusarg with --run-opts, we'll still build the binaries (but will ignore
// them).
{
name: build_otbn_rig_binaries_mode
pre_run_cmds: [
"{gen_binaries} --seed {seed} --obj-dir {otbn_obj_dir} {otbn_elf_dir}"
]
}
]
// List of test specifications.
tests: [
{
name: "otbn_smoke"
uvm_test_seq: "otbn_smoke_vseq"
en_run_modes: ["build_otbn_rig_binaries_mode"]
}
{
name: "otbn_single"
uvm_test_seq: "otbn_single_vseq"
en_run_modes: ["build_otbn_rig_binaries_mode"]
}
// TODO: add more tests here
]
// List of regressions.
regressions: [
{
name: smoke
tests: ["otbn_smoke"]
}
]
}