[dv] Fixup coverage collection to match OT dvsim flow

This commit is contained in:
Greg Chadwick 2022-11-12 12:12:10 +00:00 committed by Greg Chadwick
parent d8b00f0b17
commit 3d13c6ccd8
5 changed files with 12 additions and 2 deletions

View file

@ -41,6 +41,9 @@ SIGNATURE_ADDR := 8ffffffc
### Ibex top level parameters ###
IBEX_CONFIG := opentitan
# Path to DUT used for coverage reports
DUT_COV_RTL_PATH := "ibex_top"
###############################################################################
all: collect_results $(if $(filter 1,$(COV)),merge_cov,)
@ -116,7 +119,8 @@ new-metadata-file := $(shell env PYTHONPATH=$(PYTHONPATH) python3 ./scripts/meta
--args-list "\
SEED=$(SEED) WAVES=$(WAVES) COV=$(COV) SIMULATOR=$(SIMULATOR) \
ISS=$(ISS) TEST=$(TEST) VERBOSE=$(VERBOSE) ITERATIONS=$(ITERATIONS) \
SIGNATURE_ADDR=$(SIGNATURE_ADDR) IBEX_CONFIG=$(IBEX_CONFIG)")
SIGNATURE_ADDR=$(SIGNATURE_ADDR) IBEX_CONFIG=$(IBEX_CONFIG) \
DUT_COV_RTL_PATH=$(DUT_COV_RTL_PATH)")
### TODO ##
# Evaluate input variables to more-cleverly schedule partial-rebuilds

View file

@ -59,6 +59,8 @@ def _main() -> int:
'cmp_opts': get_compile_opts(md.ibex_config,
md.simulator),
'dir_shared_cov': (md.dir_shared_cov if md.cov else ''),
'xlm_cov_cfg_file': f"{md.ot_xcelium_cov_scripts}/common.ccf",
'dut_cov_rtl_path': md.dut_cov_rtl_path
}
# Locate the spike .pc files to allow us to link against it when building

View file

@ -89,7 +89,8 @@ def merge_cov_xlm(md: RegressionMetadata, cov_dbs: Set[pathlib.Path]) -> int:
'cov_merge_db_dir': str(md.dir_cov_merged),
'cov_report_dir': str(md.dir_cov_report),
'cov_db_dirs': "",
'cov_db_runfile': str(md.cov_merge_db_list)
'cov_db_runfile': str(md.cov_merge_db_list),
"DUT_TOP": md.dut_cov_rtl_path
}
xlm_env = os.environ.copy()
xlm_env.update(xlm_cov_dirs)

View file

@ -58,6 +58,7 @@ class RegressionMetadata(scripts_lib.testdata_cls):
iterations: Optional[int] = None
signature_addr: str = ' '
ibex_config: str = ' '
dut_cov_rtl_path: str = ''
tests_and_counts: List[Tuple[str, int]] = field(default_factory=list)
isa_ibex: Optional[str] = None

View file

@ -246,6 +246,8 @@
cov_opts: >
-coverage all
-nowarn COVDEF
-covfile <xlm_cov_cfg_file>
-covdut ibex_top
wave_opts: >
-access rwc -linedebug
cosim_opts: >