pyvsc icon indicating copy to clipboard operation
pyvsc copied to clipboard

Merge multiple coverge reports

Open Divya2030 opened this issue 4 years ago • 4 comments

Hi, i have generated multiple coverage xml files using vsc.write_coverage_db("cov.xml") . How to merge multiple xml files. is there any method to merge multiple xml files?

Divya2030 avatar Dec 29 '20 12:12 Divya2030

I don't know if this is supported by pyvsc.

Maybe https://github.com/amiq-consulting/fc4sc/tree/master/tools/coverage_merge

.... would work for you?

If you have access to a VCS license, you can convert to .vdb format using:

Usage: covimport -readucis ucis.xml -dbname snps.vdb [-mapfile map.file] [-default_bin_as_user] [-help]

edcote avatar Apr 23 '21 00:04 edcote

I've tried the tools/coverage_merge/merge.py utility from https://github.com/amiq-consulting/fc4sc but it does seem to work with UCIS files generated by pyvsc, apparently because the xml files do not include range information for coverpoints.

merge.py around line 158

def merge_bin_hits(self, bin, binMergeElement, parent_query):
        """ Sum the bin ranges' hit counts """
        # merge hits for bins which are present in both the parsed DB and mergeDBtree
        totalhits = 0
        for range in self.findall_ucis_children(bin, "range"):

Any idea on how to add this information to the UCIS files generated by pyvsc ?

rbarzic avatar Nov 09 '21 12:11 rbarzic

Clearly this has taken a bit of lower priority, given that I (and others that I know) are taking the pyVSC coverage data directly into commercial-EDA flows for manipulation. Let me invest a bit more time here...

mballance avatar Nov 09 '21 15:11 mballance

Thank you Matthew. Our team is trying to do the exact opposite, i.e. not relying on any commercial tool for the functionnal coverage. As we are using cocotb with multiple tests spread over a few files, merging of coverage data is critical for us

rbarzic avatar Nov 09 '21 20:11 rbarzic