pyvsc
pyvsc copied to clipboard
Merge multiple coverge reports
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?
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]
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 ?
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...
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