diff --git a/Changes b/Changes index 6a3999368..f39183019 100644 --- a/Changes +++ b/Changes @@ -23,6 +23,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Fix makefile with --coverage, bug953. [Eivind Liland] +**** Fix coverage documentation, bug954. [Thomas J Whatson] + * Verilator 3.874 2015-06-06 diff --git a/bin/verilator b/bin/verilator index d4d87a774..0637d6536 100755 --- a/bin/verilator +++ b/bin/verilator @@ -3573,7 +3573,10 @@ First, run verilator with the --coverage option. If you're using your own makefile, compile the model with the GCC flag -DVM_COVERAGE (if using Verilator's, it will do this for you.) -Run your tests in different directories. Each test will create a +At the end of your test, call VerilatedCov::write passing the name of the +coverage data file (typically "logs/coverage.dat"). + +Run each of your tests in different directories. Each test will create a logs/coverage.pl file. After running all of your tests, verilator_coverage is executed. diff --git a/test_sc/sc_main.cpp b/test_sc/sc_main.cpp index 57c5324c9..0ee025247 100644 --- a/test_sc/sc_main.cpp +++ b/test_sc/sc_main.cpp @@ -140,8 +140,8 @@ int sc_main(int argc, char* argv[]) { // Coverage analysis (since test passed) mkdir("logs", 0777); #if VM_COVERAGE - SpCoverage::write(); // Writes logs/coverage.pl -#endif + VerilatedCov::write("logs/coverage.dat"); +#endif // VM_COVERAGE //========== // Close LogFiles