Skip to content

Commit

Permalink
[dv, cov] Fix coverage merging for VCS in DV flow
Browse files Browse the repository at this point in the history
  • Loading branch information
GregAC committed Aug 3, 2023
1 parent eecfef3 commit e442578
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
20 changes: 14 additions & 6 deletions dv/uvm/core_ibex/scripts/merge_cov.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,23 @@ def find_cov_dbs(start_dir: pathlib.Path, simulator: str) -> Set[pathlib.Path]:


def merge_cov_vcs(md: RegressionMetadata, cov_dirs: Set[pathlib.Path]) -> int:
logging.info("Generating merged coverage directory")
cmd = (['urg', '-full64',
'-format', 'both',
'-dbname', str(md.cov_dir/'merged.vdb'),
'-report', str(md.cov_dir/'report'),
'-log', str(md.cov_dir/'merge.log'),
'-dbname', str(md.dir_cov/'merged.vdb'),
'-report', str(md.dir_cov/'report'),
'-log', str(md.dir_cov/'merge.log'),
'-dir'] +
list(cov_dirs))
return run_one(md.verbose, cmd, redirect_stdstreams='/dev/null')
list(map(str, cov_dirs)))

# Update the metdadata file with the commands we're about to run
with LockedMetadata(md.dir_metadata, __file__) as md:
md.cov_merge_log = md.dir_cov / 'merge.log'
md.cov_merge_stdout = md.dir_cov / 'merge.log.stdout'
md.cov_merge_cmds = [cmd]

with open(md.cov_merge_stdout, 'wb') as fd:
logging.info("Generating merged coverage directory")
return run_one(md.verbose, cmd, redirect_stdstreams=fd)


def merge_cov_xlm(md: RegressionMetadata, cov_dbs: Set[pathlib.Path]) -> int:
Expand Down
1 change: 1 addition & 0 deletions dv/uvm/core_ibex/scripts/run_rtl.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def _main() -> int:
'rtl_sim_log': trr.rtl_log,
'rtl_trace': trr.rtl_trace.parent/'trace_core',
'iss_cosim_trace': trr.iss_cosim_trace,
'core_ibex': md.ibex_dv_root,
'sim_opts': (f"+signature_addr={md.signature_addr}\n" +
f"+test_timeout_s={trr.timeout_s}\n" +
f"{get_sim_opts(md.ibex_config, md.simulator)}\n" +
Expand Down
3 changes: 1 addition & 2 deletions dv/uvm/core_ibex/yaml/rtl_simulation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
wave_opts: >-
-debug_access+all
-ucli
-do vcs.tcl
cosim_opts: >-
-f <core_ibex>/ibex_dv_cosim_dpi.f
-LDFLAGS '<ISS_LDFLAGS>'
Expand Down Expand Up @@ -81,7 +80,7 @@
+enable_ibex_fcov=1
wave_opts: >
-ucli
-do <cwd>/vcs.tcl
-do <core_ibex>/vcs.tcl
############################################################
Expand Down

0 comments on commit e442578

Please sign in to comment.