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

Coverage --annotate-min issues #1648

Closed
veripoolbot opened this issue Dec 18, 2019 · 3 comments
Closed

Coverage --annotate-min issues #1648

veripoolbot opened this issue Dec 18, 2019 · 3 comments
Labels
resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: alaa ashraf
Original Redmine Issue: 1648 from https://www.veripool.org

Original Assignee: alaa ashraf


hello,
i am using verilator to test a simple mux 4_1. i need to calculate the branch coverage. i see that --coverage-line is a branch coverage. i want to use --annotate-min option because i need to cover only a branch one or two times. i am using this in the make file

$(VERILATOR_COVERAGE) --annotate-min 1 --annotate logs/annotated logs/coverage.dat  

and this in the end of sim_main_test

#if VM_COVERAGE
mkdir("logs", 0777);
VerilatedCov::write("logs/coverage.dat");
#endif

the problem is the annotated output (top.v in the logs/annotated file) is not generated.
when i don't use --annotate-min 1 the annotated output is generated but i get a very strange output coverage percentage equal 0 although i see each branch statements is count = 8 in the top.v in anotated file

could someone please explain to me what is going on ?

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-12-18T12:30:36Z


When using --annotate-min I get

 Total coverage (4/4) 100.00%

And the logs/top.v file is not generated as it's fully covered - perhaps you're looking at stale results, I suggest adding a rm to the makefile, I'll fix that in the examples.

Can you confirm this is the problem, or is it something else?

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: alaa ashraf
Original Date: 2019-12-18T13:36:32Z


so if it is fully covered the logs/top.v is not generated ?
i have another problem now
i was using scientific linux so i installed verilator using yum and everythink is good
but i tried it on docker which have upunto in it and i install verilator using apt-get as descried but i got an old version which doesn't support --coverage option
do you know how to install the latest version in upunto using apt-get ?

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-12-18T23:04:21Z


so if it is fully covered the logs/top.v is not generated ?

Correct.

I pushed fixing the examples to pre-remove the files.

Sorry, others make the packages such as RPM/APT, so I don't know. I would certainly suggest building from git yourself as described under [[Installing]] here.

@veripoolbot veripoolbot added the resolution: fixed Closed; fixed label Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

1 participant