Analyzing Coverage

The ucis show sub-commands extract coverage data from any UCIS database and print it in text or JSON format. Use them for quick checks, scripting, and CI/CD gates.

Step 1 — Summary

ucis show summary coverage.xml

Prints overall coverage percentage and a breakdown by type (functional, code, assertion, toggle). Add --output-format json for machine-readable output:

ucis show summary coverage.xml --output-format json | jq '.overall_coverage'

Step 2 — Gaps

ucis show gaps coverage.xml

Lists every item below 100% coverage. Use --threshold to show only items below a specific percentage, and --limit to cap the output:

ucis show gaps coverage.xml --threshold 80 --limit 20

Step 3 — Hotspots

ucis show hotspots coverage.xml

Provides prioritized recommendations (P0/P1/P2) based on coverage percentage and potential impact. The --target option sets the goal:

ucis show hotspots coverage.xml --target 90

Step 4 — Drill Down

Covergroups

ucis show covergroups coverage.xml
ucis show covergroups coverage.xml --pattern "alu_*"

Bins

ucis show bins coverage.xml --covergroup addr_cg
ucis show bins coverage.xml --status missed   # only uncovered bins

Tests

ucis show tests coverage.xml

Shows per-test pass/fail status and test-specific coverage contribution.

Hierarchy

ucis show hierarchy coverage.xml --depth 3

Assertions and Toggle

ucis show assertions coverage.xml
ucis show toggle coverage.xml

Other Options

All show commands accept:

  • --output-format / -ofjson, text (default varies by command)

  • --out / -o — write output to a file instead of stdout

  • --input-format / -if — source format (default: xml)

Coverage Gate Script

Check whether coverage meets a threshold in CI/CD:

#!/bin/bash
COVERAGE=$(ucis show summary coverage.xml -of json | jq -r '.overall_coverage')
THRESHOLD=80
if (( $(echo "$COVERAGE < $THRESHOLD" | bc -l) )); then
    echo "Coverage ${COVERAGE}% is below ${THRESHOLD}%"
    exit 1
fi

See the full parameter reference in CLI Command Reference.

Next Steps