From 965b88be490bd899bba5cfa3251033d574ded67d Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Wed, 30 Nov 2022 21:28:23 +0000 Subject: [PATCH] Man page tidying and editing --- nvc.1 | 70 +++++++++++++++++++++++++++-------------------------------- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/nvc.1 b/nvc.1 index 83c6342e..3a21277b 100644 --- a/nvc.1 +++ b/nvc.1 @@ -16,8 +16,6 @@ .Nm .Fl r .Fa unit -.Nm -.Fl c Ar .\" ------------------------------------------------------------ .\" Description .\" ------------------------------------------------------------ @@ -362,15 +360,15 @@ section below for how to control this. .\" ------------------------------------------------------------ .Ss Coverage processing options .Bl -tag -width Ds -.It Fl -merge= Ar OUTPUT +.It Fl -merge= Ns Ar output Merge multiple .Ar file code coverage databases into -.Ar OUTPUT +.Ar output code coverage database. -.It Fl -report= Ar DIR +.It Fl -report= Ns Ar dir Generate HTML code coverage report to -.Ar DIR +.Ar dir directory. .El .\" ------------------------------------------------------------ @@ -467,8 +465,9 @@ that allows multiple concurrent readers but only a single writer. .\" CODE COVERAGE .\" ------------------------------------------------------------ .Sh CODE COVERAGE -NVC supports collecting of code coverage. Following coverage types -are supported: +.Nm +can collect code coverage data while the simulation is executing. +The following coverage types are supported: .Bl -bullet .It .Cm statement @@ -476,27 +475,23 @@ are supported: executed, it is covered. .It .Cm branch -- For each point where code diverges (if/else, case, -when/else, with/select statements), NVC creates coverage bin. If -branch can be evaluated to both true and false, NVC creates two -coverage bins for such branch (one for each of true/false) +- For each point where code diverges (if/else, case, when/else, +with/select statements), NVC creates coverage bin. If branch can be +evaluated to both true and false, NVC creates two coverage bins for such +branch (one for each of true/false) .It .Cm toggle -- Each signal of type derived from std_logic +- Each signal of type derived from +.Ql std_logic (including nested arrays) creates two coverage bins (to track -.Cm 0 --> -.Cm 1 -and -.Cm 1 --> -.Cm 0 -transitions). +\fB0\fP -> \fB1\fP and \fB1\fP -> \fB0\fR transitions). .El +.Pp Collecting each coverage type can be enabled separately at elaboration time: .Bd -literal -offset indent $ nvc -e --cover=statement,branch,toggle .Ed +.Pp If no coverage type is specified as argument of .Fl -cover ,all coverage types are collected. After @@ -504,7 +499,7 @@ simulation is executed, NVC dumps coverage data into coverage database file (*.covdb). To merge coverage databases from multiple simulations, and generate hierarchy coverage report in HTML format, run: .Bd -literal -offset indent -$nvc -c --merge=merged.covdb --report= \\ +$ nvc -c --merge=merged.covdb --report= \\ first.covdb second.covdb third.covdb ... .Ed .Pp @@ -561,33 +556,33 @@ elaboration option, e.g.: .Bd -literal -offset indent $ nvc -e --cover=all,ignore_mems,count-from-undefined .Ed -Coverage collection on parts of the code can be ignored via dedicated pragma, e.g.: +.Pp +Coverage collection on parts of the code can be ignored via a comment +pragma, for example: .Bd -literal -offset indent case (sel) is -when "00" => ... -when "01" => ... -when "10" => ... -when "11" => ... --- coverage off -when others => report "ERROR" severity failure; --- coverage on + when "00" => ... + when "01" => ... + when "10" => ... + when "11" => ... + -- coverage off + when others => report "ERROR" severity failure; + -- coverage on end case; .Ed .Pp -in the example above, statement coverage for -.Cm report +In the example above, statement coverage for the +.Ql report statement and branch coverage for -.Cm others +.Ql others choice will not be collected. - -Toggle coverage collection on specific signals can be also disabled, e.g.: +.Pp +Toggle coverage collection on specific signals can be also disabled: .Bd -literal -offset indent -- coverage off signal cnt : std_logic_vector(3 downto 0); -- coverage on .Ed -.Pp - .\" ------------------------------------------------------------ .\" Relaxed rules .\" ------------------------------------------------------------ @@ -732,7 +727,6 @@ int32_t my_func(int32_t x, const uint8_t *y, uint8_t z) { ... } .Ed .Pp Foreign procedures may be defined similarly: -.Pp .Bd -literal -offset indent function my_proc (x : out integer; y : out bit_vector; z : std_logic); attribute foreign of my_proc : function is "VHPIDIRECT my_proc"; -- 2.39.2