Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
veripoolbot opened this issue Mar 7, 2018 · 2 comments
Closed

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Mar 7, 2018


Author Name: Tymoteusz Blazejczyk
Original Redmine Issue: 1284 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


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;
}
</code>
  • 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 :)
@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Mar 8, 2018


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-03-08T00:54:12Z


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

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Mar 17, 2018


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-03-17T16:03:50Z


In 3.922.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.