Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

Issue #1284

Unsupported --annotate-min command line argument for verilator_coverage tool

Added by Tymoteusz Blazejczyk over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Unsupported
% Done:

0%

Estimated time:
1.00 h

Description

Hi,

--annotate-min command line argument for verilator_coverage tool is not supported. Missing implementation handling for this flag in src/VlcMain.cpp.

Patch included.

Story:
  • I'm developing some CMake utilities for building and testing HDL projects: https://github.com/tymonx/logic
  • One of many build targets is to create zero coverage point from all HDL modules. Like gcov for GCC. This step is hidden from developer and automate by CMake by calling verilator with --exe and --coverage flags and execute binary to get zero point coverage:
#include "@verilator_target@.h" 

#include "verilated.h" 
#include "verilated_cov.h" 

double sc_time_stamp() {
    return 0;
}

int main() {
    @verilator_target@ top{};
    top.eval();
    top.final();

    VerilatedCov::write("coverage.dat");

    return 0;
}
  • At this point we have 0.0% coverage from all HDL modules
  • HDL developer responsibility is to create unit tests for each HDL module to increase coverage %
  • CMake run verilator_coverage tool with zero coverage data and coverage data from created unit tests
  • I need to set annotate-min to lowest possible value, like in gcov, to make life harder :)
  • (During developing...) Some nice Python script will parse all output files *.sv from verilator_coverage tool to send coverage results with HDL file content to coveralls.io site or/and codecov.io site
  • And after that we will have nice coverage badge with % for HDL modules on GitHub :)

0001-Added-missed-annotate-min-for-verilator_coverage.patch View (991 Bytes) Tymoteusz Blazejczyk, 03/07/2018 10:56 PM

History

#1 Updated by Wilson Snyder over 1 year ago

  • Status changed from New to Resolved

Thanks for the great patch. Pushed to git towards 3.922.

#2 Updated by Wilson Snyder over 1 year ago

  • Status changed from Resolved to Closed

In 3.922.

Also available in: Atom