jbush001 / NyuziProcessor

GPGPU microprocessor architecture
Apache License 2.0
1.96k stars 348 forks source link

Verilator coverage testing #178

Open jbush001 opened 5 years ago

jbush001 commented 5 years ago

Collect coverage information at end of tests.

https://www.veripool.org/projects/verilator/wiki/Manual-verilator

  1. Pass --coverage option to verilator in makefile
  2. Modify c++ test harness to VerilatedCov::write into an output file. There will be one file per test, which should be collected somewhere (this probably needs to be done by test_harness.py)
  3. Run verilator_coverage executable, passing paths of all output files, which it will consolidate.
jbush001 commented 5 years ago

It takes a very long time to compile the full processor model with this enabled, which may be prohibitive. This may still be useful for unit tests.