########################### HTML Coverage Report Format ########################### The HTML coverage report format generates a single-file, interactive HTML report that provides comprehensive visualization and analysis of UCIS coverage data. The report can be opened directly in any modern web browser without requiring a web server or external dependencies. **Key Features:** * **Single-File Portability** - All data, code, and styles embedded in one HTML file * **Interactive Navigation** - Expandable hierarchical tree with filtering and search * **D3.js Visualizations** - Pie charts, bar charts, and treemaps for coverage analysis * **Coverpoint Bin Details** - View individual bins with hit counts, goals, and status * **Zero Dependencies** - JavaScript libraries loaded from CDN (works offline if cached) * **Responsive Design** - Professional UI that works on desktop and tablet * **Export Friendly** - Easy to share via email, archive, or web hosting Generating HTML Reports ======================= Command Line ------------ The ``pyucis report`` command can generate HTML reports using the ``-of html`` option: .. code-block:: bash # Basic HTML report pyucis report coverage.xml -of html -o report.html # From SQLite database pyucis report coverage.ucis -of html -o report.html # From YAML pyucis report coverage.yaml -of html -o report.html The generated HTML file can be opened directly in any browser: .. code-block:: bash firefox report.html # or chrome report.html # or open report.html # macOS Python API ---------- You can generate HTML reports programmatically using the ``HtmlFormatter`` class: .. code-block:: python from ucis import UCIS from ucis.formatters.format_html import HtmlFormatter # Load database db = UCIS.load("coverage.xml") # Create formatter formatter = HtmlFormatter( include_source=True, # Include source file info compress=False, # Don't compress data (better for debugging) theme='light' # Use light theme ) # Generate report with open("report.html", "w") as f: formatter.format(db, f) Report Features =============== Summary Dashboard ----------------- The summary view provides high-level coverage metrics: * **Total Coverage Percentage** - Overall coverage across all items * **Total Items** - Count of all coverage items (bins, statements, etc.) * **Covered Items** - Count of items that have been hit * **Uncovered Items** - Count of items that have not been hit * **Coverage by Type** - Breakdown by coverage type (functional, line, branch, etc.) * **Progress Bar** - Visual representation of overall coverage Hierarchical Navigation ----------------------- The hierarchy view displays the complete design/verification structure: **Tree Features:** * **Expandable/Collapsible Nodes** - Click arrows (▶/▼) to show/hide children * **Expand All / Collapse All** - Buttons to quickly navigate deep hierarchies * **Type-Specific Icons** - Visual distinction between modules (📦), covergroups (📋), coverpoints (🎯), etc. * **Scope Type Labels** - Shows type in parentheses, e.g., "my_covergroup (COVERGROUP)" * **Coverage Indicators** - Color-coded percentages (green ≥80%, orange 50-80%, red <50%) * **4-Level Deep Support** - Handles nested hierarchies up to 4 levels **Filtering:** * **Search** - Real-time text search across scope names * **Status Filter** - Filter by all/covered/uncovered/partial coverage * **Coverage Threshold** - Show only scopes meeting minimum coverage percentage * **Reset** - Clear all filters with one click Coverpoint Bin Details ----------------------- When you click on a coverpoint in the hierarchy, a detailed table displays all bins: **Bin Table Columns:** 1. **Bin Name** - Identifier for the bin (monospace font) 2. **Type** - Badge showing bin type: * ``bin`` (blue) - Regular coverage bin * ``ignore_bin`` (orange) - Excluded from coverage calculations * ``illegal_bin`` (red) - Should never be hit 3. **Hits** - Number of times the bin was hit (formatted with thousands separators) 4. **Goal** - Target hit count (at_least threshold) 5. **Status** - Badge showing bin status: * ``covered`` (green) - Hit count ≥ goal * ``uncovered`` (red) - Hit count < goal * ``ignored`` (gray) - Excluded bin * ``illegal`` (red) - Illegal bin was hit (error!) * ``ok`` (green) - Illegal bin not hit 6. **Coverage** - Mini progress bar + percentage showing hits/goal ratio **Visual Features:** * **Row Highlighting** - Green background for covered bins, red for illegal bins that were hit * **Hover Effects** - Subtle highlighting when hovering over rows * **Sortable** - (Future: Click headers to sort) * **Color-Coded Progress Bars** - Green (covered), orange (partial), red (uncovered) Interactive Visualizations --------------------------- The Charts tab provides three D3.js-powered visualizations: Pie Chart: Coverage by Type ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Displays coverage percentage breakdown by type (functional, line, branch, toggle, etc.): * **Color-Coded Segments** - Each type has a distinct color * **Interactive Tooltips** - Hover to see exact percentages * **Smart Labels** - Only show labels for segments >5% to avoid clutter * **Hover Effects** - Segments highlight on mouseover Bar Chart: Top Coverage Gaps ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Shows the 10 scopes with the lowest coverage: * **Horizontal Bars** - Length represents coverage percentage * **Color-Coded** - Red (<50%), orange (50-80%), green (≥80%) * **Labeled Axes** - Clear percentage scale and scope names * **Interactive Tooltips** - Hover for scope name and exact percentage * **Priority Identification** - Focus on items that need the most work Treemap: Hierarchical Coverage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Visualizes the entire design hierarchy as nested rectangles: * **Rectangle Size** - Proportional to scope weight (importance) * **Rectangle Color** - Based on coverage percentage: * Red (0-50%) - Low coverage, needs attention * Orange (50-80%) - Moderate coverage * Green (80-100%) - Good coverage * **Labels** - Scope name and coverage % shown for larger cells * **Interactive Tooltips** - Hover for detailed information * **Hover Highlighting** - Border thickness increases on mouseover * **Quick Overview** - See entire project status at a glance Coverage Gaps View ------------------ Shows all scopes with less than 100% coverage: * **Filtered List** - Only incomplete coverage items * **Quick Identification** - Find areas that need more verification * **Coverage Percentages** - See how close each item is to completion By Type View ------------ Lists coverage statistics grouped by coverage type: * **Functional Coverage** - Covergroups and coverpoints * **Code Coverage** - Line, branch, toggle, block, etc. * **Organized Display** - Easy to see strengths and weaknesses Technical Details ================= File Structure -------------- The HTML report is completely self-contained: .. code-block:: html