nickg / nvc

VHDL compiler and simulator
https://www.nickg.me.uk/nvc/
GNU General Public License v3.0
591 stars 75 forks source link

Double report level breaks simulation result analysis scripts #849

Closed m-kru closed 4 months ago

m-kru commented 4 months ago

Example:

entity test is end entity;
architecture test of test is
begin
   process is
   begin
      report "Hello Dolly!" severity warning;
      wait;
   end process;
end architecture;

nvc output:

** Warning: 0ms+0: Report Warning: Hello Dolly!
     /tmp/test/test.vhd:8

GHDL output:

/tmp/test/test.vhd:8:7:@0ms:(report warning): Hello Dolly!

xsim output:

Warning: Hello Dolly!
Time: 0 ps  Iteration: 0  Process: /test/line__6  File: /tmp/test/test.vhd

Most simulation result analysis scripts count the number of warnings, errors or failures simply by counting occurrences of warning, error, and failure words. nvc prints the level twice, so the analysis scripts count roughly two times more warnings etc., than there are. Alternative approach is to count lines with words, not words. However, some testbenches might report multiple warnings or errors in one line.

There are no formal rules requiring that single warning/error/failure emits single warning/error/failure word in the output. However, this is very handy and common practice, as it eases writing parsing scripts.

As a side note, xsim does not add the "report/Report" word to meet 10.4 from LRM.