Skip to content

Commit 3d13c6c

Browse files
committed
[dv] Fixup coverage collection to match OT dvsim flow
1 parent d8b00f0 commit 3d13c6c

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

dv/uvm/core_ibex/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ SIGNATURE_ADDR := 8ffffffc
4141
### Ibex top level parameters ###
4242
IBEX_CONFIG := opentitan
4343

44+
# Path to DUT used for coverage reports
45+
DUT_COV_RTL_PATH := "ibex_top"
46+
4447
###############################################################################
4548

4649
all: collect_results $(if $(filter 1,$(COV)),merge_cov,)
@@ -116,7 +119,8 @@ new-metadata-file := $(shell env PYTHONPATH=$(PYTHONPATH) python3 ./scripts/meta
116119
--args-list "\
117120
SEED=$(SEED) WAVES=$(WAVES) COV=$(COV) SIMULATOR=$(SIMULATOR) \
118121
ISS=$(ISS) TEST=$(TEST) VERBOSE=$(VERBOSE) ITERATIONS=$(ITERATIONS) \
119-
SIGNATURE_ADDR=$(SIGNATURE_ADDR) IBEX_CONFIG=$(IBEX_CONFIG)")
122+
SIGNATURE_ADDR=$(SIGNATURE_ADDR) IBEX_CONFIG=$(IBEX_CONFIG) \
123+
DUT_COV_RTL_PATH=$(DUT_COV_RTL_PATH)")
120124

121125
### TODO ##
122126
# Evaluate input variables to more-cleverly schedule partial-rebuilds

dv/uvm/core_ibex/scripts/compile_tb.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ def _main() -> int:
5959
'cmp_opts': get_compile_opts(md.ibex_config,
6060
md.simulator),
6161
'dir_shared_cov': (md.dir_shared_cov if md.cov else ''),
62+
'xlm_cov_cfg_file': f"{md.ot_xcelium_cov_scripts}/common.ccf",
63+
'dut_cov_rtl_path': md.dut_cov_rtl_path
6264
}
6365

6466
# Locate the spike .pc files to allow us to link against it when building

dv/uvm/core_ibex/scripts/merge_cov.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ def merge_cov_xlm(md: RegressionMetadata, cov_dbs: Set[pathlib.Path]) -> int:
8989
'cov_merge_db_dir': str(md.dir_cov_merged),
9090
'cov_report_dir': str(md.dir_cov_report),
9191
'cov_db_dirs': "",
92-
'cov_db_runfile': str(md.cov_merge_db_list)
92+
'cov_db_runfile': str(md.cov_merge_db_list),
93+
"DUT_TOP": md.dut_cov_rtl_path
9394
}
9495
xlm_env = os.environ.copy()
9596
xlm_env.update(xlm_cov_dirs)

dv/uvm/core_ibex/scripts/metadata.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class RegressionMetadata(scripts_lib.testdata_cls):
5858
iterations: Optional[int] = None
5959
signature_addr: str = ' '
6060
ibex_config: str = ' '
61+
dut_cov_rtl_path: str = ''
6162

6263
tests_and_counts: List[Tuple[str, int]] = field(default_factory=list)
6364
isa_ibex: Optional[str] = None

dv/uvm/core_ibex/yaml/rtl_simulation.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@
246246
cov_opts: >
247247
-coverage all
248248
-nowarn COVDEF
249+
-covfile <xlm_cov_cfg_file>
250+
-covdut ibex_top
249251
wave_opts: >
250252
-access rwc -linedebug
251253
cosim_opts: >

0 commit comments

Comments
 (0)