4. Config.ini Spec¶
This chapter will discuss the syntax and structure of the config.ini
file used by river_core.
A sample config-file is present in the examples
directory of the Git Repository.
Note
RiVer Core can automatically detect the configuration file present in the current directory.
4.1. General Configuration Options¶
Parameter |
Description |
---|---|
workdir |
The workdir where all of the files, reports and logs are generated. |
target |
Name of Target or the Device under Test(DUT) that is to be verified. |
reference |
Name of the the golden reference model to be used for verification. |
generator |
The test program generator to be used to generate tests. |
path_to_suite |
Absolute path to the generator plugin. |
path_to_target |
Absolute path to the target/DUT plugin. |
path_to_ref |
Absolute path to the reference plugin. |
isa |
ISA string supported by the target. This is supplied to all plugins for any due processing/configuration that is required. |
open_browser |
[Boolean] Opens the final report automatically in your default browser |
space_saver |
[Boolean] This feature can be used by DUT and Ref plugins to remove unwanted artifacts (like dumps, disassembly files, etc) after the tests have been run |
coverage |
Enable Coverage mode. There are two boolean options available under this: Code and Functional |
Note
The standard delimiter for options having multiple values is , (comma) .
4.2. Plugin Specific Options¶
Apart from the above general parameters, the user can also specify some of the
plugin specific parameters in the same config.ini
file. A typical syntax to
do this would be:
[<plugin-name>]
config-1: value
config-2: value-2
[<plugin-name2]
param-1: val1
param-2: val2
The interpretation and side-effects of these plugin specific parameters is completely left to the plugin. RiVer Core simply forwards them to the respective plugin via the hooks.
Note
A plugins parameters cannot be sent to another plugin. However each plugin will receive its parameters and also the general configuration parameters
Some of the recommended configuration options for generators would be:
Parameters |
Description |
---|---|
jobs |
Number of jobs to use while generating the tests |
filter |
This option is to select tests. |
seed |
A seed for generating the programs (Can be random) |
count |
The number of times the test needs to be run |
4.3. Sample Config INI¶
[river_core]
# ',' is the delimiter
# Main directory for all files generated by river_core
work_dir = test
# Target is the DuT plugin
target = chromite_verilator
# Reference is the reference model plugin
reference = modspike
# Generator options for the compiler
# Should ideally be aapg, microtesk, generic and if something else comes along
generator = aapg
# ISA for the tests
isa = rv64imafdc
# Set paths for each plugin
path_to_target = /scratch/git-repo/github/incoresemi/river_core_plugins/dut_plugins
path_to_ref = /scratch/git-repo/github/incoresemi/river_core_plugins/reference_plugins
path_to_suite = /scratch/git-repo/github/incoresemi/river_core_plugins/generator_plugins
# To open the report automatically in the browser
open_browser = True
# Enable Space Saver
space_saver = True
# Coverage Options
# Enable via True/False
[coverage]
code = False
functional = False
[testfloat]
jobs=8
seed = random
count = 1
filter =
config_yaml = /scratch/git-repo/github/incoresemi/river_core_plugins/generator_plugins/testfloat_plugin/testfloat_gen_config.yaml
[aapg]
# Number of jobs to use to generate the tests
jobs = 8
# Filter for your tests
filter = rv64imafdc_hazards_s
seed = random
count = 2
# some_specific_yaml
config_yaml = /scratch/git-repo/incoresemi/river-framework/core-verification/river_core_plugins/generator_plugins/aapg_plugin/aapg_gen_config.yaml
[microtesk]
jobs = 1
filter = uentry_fmv_x_d or uentry_fcvt_s_lu
seed = random
count = 1
[chromite_verilator]
jobs = 8
filter =
count = 1
# src dir: Verilog Dir, BSC Path, Wrapper path
src_dir = /scratch/git-repo/incoresemi/core-generators/chromite/build/hw/verilog/,/software/open-bsc/lib/Verilog,/scratch/git-repo/incoresemi/core-generators/chromite/bsvwrappers/common_lib
# Top Module for simulation
top_module = mkTbSoc
[modspike]
# Number of jobs to use to generate the tests
jobs = 1
filter =
# some_specific_yaml
count = 1
[riscof]
jobs = 8
count = 1
seed = random
riscof_config=/scratch/git-repo/github/incoresemi/river_core_plugins/dut_plugins/chromite_verilator_plugin/riscof_plugin/config.ini