Commentary: Add coverage type to example (#7148)

This commit is contained in:
AUDIY
2026-02-25 01:26:51 -05:00
committed by GitHub
parent 7dde11b4c6
commit 8d34bc786a
2 changed files with 21 additions and 21 deletions
+15 -15
View File
@@ -79,18 +79,18 @@ verilator_coverage Arguments
.. code-block::
100000 input logic a; // Begins with whitespace, because
// number of hits (100000) is above the min.
+100000 point: comment=a // Begins with +, because
// number of hits (100000) is above the min.
%000000 input logic b; // Begins with %, because
// number of hits (0) is below the min.
-000000 point: comment=b // Begins with -, because
// number of hits (0) is below the min.
~000010 if (cyc!=0) begin // Begins with ~, because
// branches are below and above the min.
+000010 point: comment=if // The if branch is above the min.
-000000 point: comment=else // The else branch is below the min.
100000 input logic a; // Begins with whitespace, because
// number of hits (100000) is above the min.
+100000 point: type=line comment=a // Begins with +, because
// number of hits (100000) is above the min.
%000000 input logic b; // Begins with %, because
// number of hits (0) is below the min.
-000000 point: type=line comment=b // Begins with -, because
// number of hits (0) is below the min.
~000010 if (cyc!=0) begin // Begins with ~, because
// branches are below and above the min.
+000010 point: type=branch comment=if // The if branch is above the min.
-000000 point: type=branch comment=else // The else branch is below the min.
.. option:: --annotate-all
@@ -119,9 +119,9 @@ verilator_coverage Arguments
.. code-block::
100000 input logic a, b, c;
+100000 point: comment=a // These lines are only shown
+200000 point: comment=b // with option --annotate-points
+300000 point: comment=c // enabled.
+100000 point: type=line comment=a // These lines are only shown
+200000 point: type=line comment=b // with option --annotate-points
+300000 point: type=line comment=c // enabled.
This option should be used together with :option:`--annotate`.
+6 -6
View File
@@ -295,12 +295,12 @@ combination was hit. Note that individual lines are not mutually exclusive.
.. code-block::
%000004 if ((~t1 && t2) || (~t3 && t4)) $write("");
-000002 point: comment=(t1==0 && t2==1) => 1 hier=top.t
-000002 point: comment=(t1==1 && t3==1) => 0 hier=top.t
-000004 point: comment=(t1==1 && t4==0) => 0 hier=top.t
-000002 point: comment=(t2==0 && t3==1) => 0 hier=top.t
-000003 point: comment=(t2==0 && t4==0) => 0 hier=top.t
-000002 point: comment=(t3==0 && t4==1) => 1 hier=top.t
-000002 point: type=expr comment=(t1==0 && t2==1) => 1 hier=top.t
-000002 point: type=expr comment=(t1==1 && t3==1) => 0 hier=top.t
-000004 point: type=expr comment=(t1==1 && t4==0) => 0 hier=top.t
-000002 point: type=expr comment=(t2==0 && t3==1) => 0 hier=top.t
-000003 point: type=expr comment=(t2==0 && t4==0) => 0 hier=top.t
-000002 point: type=expr comment=(t3==0 && t4==1) => 1 hier=top.t
.. _suppressing coverage: