diff --git a/dv/uvm/core_ibex/Makefile b/dv/uvm/core_ibex/Makefile index 1fa1f72b..43bfee20 100644 --- a/dv/uvm/core_ibex/Makefile +++ b/dv/uvm/core_ibex/Makefile @@ -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 diff --git a/dv/uvm/core_ibex/scripts/compile_tb.py b/dv/uvm/core_ibex/scripts/compile_tb.py index 02433f69..72dd982f 100755 --- a/dv/uvm/core_ibex/scripts/compile_tb.py +++ b/dv/uvm/core_ibex/scripts/compile_tb.py @@ -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 diff --git a/dv/uvm/core_ibex/scripts/merge_cov.py b/dv/uvm/core_ibex/scripts/merge_cov.py index 54babe16..8d7e1af4 100755 --- a/dv/uvm/core_ibex/scripts/merge_cov.py +++ b/dv/uvm/core_ibex/scripts/merge_cov.py @@ -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) diff --git a/dv/uvm/core_ibex/scripts/metadata.py b/dv/uvm/core_ibex/scripts/metadata.py index d2ca9ffc..35efda9b 100755 --- a/dv/uvm/core_ibex/scripts/metadata.py +++ b/dv/uvm/core_ibex/scripts/metadata.py @@ -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 diff --git a/dv/uvm/core_ibex/yaml/rtl_simulation.yaml b/dv/uvm/core_ibex/yaml/rtl_simulation.yaml index 4fe78111..6d3d76f3 100644 --- a/dv/uvm/core_ibex/yaml/rtl_simulation.yaml +++ b/dv/uvm/core_ibex/yaml/rtl_simulation.yaml @@ -246,6 +246,8 @@ cov_opts: > -coverage all -nowarn COVDEF + -covfile + -covdut ibex_top wave_opts: > -access rwc -linedebug cosim_opts: >