Knowledge Base Administration Guide

Coverage Data Integration and Publishing

To integrate Coverage Data into Simscope, you need to:

  1. Create Coverage TSV files.
    • If you have an existing coverage file format, you should build a conversion script first.
  2. Create a parent Regression in Simscope to store the coverage under.
  3. Publish (import) coverage into Simscope.

Input Format

FieldTypeDescriptionExample Value
namestringCoverage point namea.b.c.my_coverage_point
groupstringParent coverage group (optional)alpha
locationstringfile/line location (optional)foo/bar.sv:1234
hitsintNumber of times the point was hit100 (or 0 indicates not hit)
binsintFor line coverage, this indicates the number of statement lines (use 0 or comma for normal coverage)0

Example Coverage TSV file

Simscope Coverage uses a TSV (tab-separated-value) input file format.

Each line describes one coverage point, and each field is delimited by a <TAB> character.

name	group	location	hits	bins
a.b.c.unused	ChkAllPtFlushUnusedCheck	tb/file1.sv	0	,
a.b.c.full[0]	2D Array	tb/file2.sv	1111	,
a.b.c.full[1]	2D Array	tb/file3.sv	400	,

This example contains:

  • Three coverage points
  • Two coverage groups
  • One coverage point has zero hits (ie uncovered)
  • All coverage points are using default bins (via a single comma)

admin: Enabling Coverage in Simscope

Administrators: to enable coverage in Simscope, add the following to your simscope.config file:

[coverage]
enabled = true

# Optional: Coverage group separator to enable hierarchical tree grouping.
# This can be any string, and can also be multiple characters.
# - For example, cover group "a.b.c" with a groupseparator of "." would split into three hierarchical groups (a, b, and c)
#groupseparator = "."

# Optional: Sub-model separator: allow multiple coverage models in the same regression (suffix).
# Example using "." as separator: "myblock_smoke/123.top" and "myblock_smoke/123.fpu"
#submodelseparator = "."

# To enable formal coverage property tracking, add these settings.
#enableformal = true

# For 'bounded' proof properties, set this to the minimum number of cycles for a bounded pass.
# Any undetermined property with cycles below this value is a fail.
#minimumcycles = 5

Publishing Coverage models to Simscope

To publish (ie import) coverage databases into Simscope, run the simscope-publish-coverage Python script with these arguments:

  • TSV coverage file path.
  • Regression name to store under.

For example, to import mycov.tsv into Regression daily/123:

> bin/simscope-publish-coverage --tunnel-config=simscope-tunnel.config --regr daily/123 mycov.tsv

If successful, you should see a response on the console similar to the following:

coverage ok: /home/pdq/mycov.tsv → daily/123

Delete coverage DB

To delete a coverage DB, use the --delete CLI option.

Merge vs Replace coverage DB

By default, if you publish coverage to an already existing coverage DB location, the data will be merged (ie combined) with the prior DB's results.

  • If you would like to replace (ie overwrite) the coverage DB (instead of merging), add the --replace CLI option.
  • Or you can --delete the coverage first.

Alternative flow: Publishing via tunnel

You can publish a coverage TSV file directly via simscope-tunnel client.

For example, to publish mycov.tsv into daily/123:

> bin/simscope-tunnel --config=simscope-tunnel.config --publish=coverage-update --regression=daily/123 \
mycov.tsv

Alternative: Curl publishing (using API tokens)

If you don't want to use Python and Tunnel to publish covearge, you can alternatively use simscope-tunnel-publish.sh to publish via curl (which also requires an API Token).


Multiple coverage databases (sub-model coverage)

Simscope supports multiple coverage models published into a single regression.

  • This allows publishing separate coverage types (e.g. line, formal, functional).
  • Or you can store separate coverage models for sub-units (e.g. block1, block2, etc).

To do this, your coverage model name needs a separator string, under the configuration key submodelseparator field.

For example, if you set the separator to "." and upload two coverage models named as:

  • "alpha_cpu_cov/1024.top"
  • "alpha_cpu_cov/1024.ddr3"
  • "alpha_cpu_cov/1024.subsystem.ddr3"

Then Simscope will store 2 separate coverage models under a single parent regression:

  • alpha_cpu_cov/1024
    • top
    • ddr3
    • subsystem.ddr3

Here is an example showing 2 coverage models in a single regression:

Multiple