I am integrating NVC Code Coverage into the Open Logic design flow. It'd be great to have an open-source tool for coverage reporting - so first of all: Thank you for your efforts!
I have set-up a branch to implement this Open Logic feature/nvc-coverage. I pushed everything needed to reproduce the issue reported here.
To reproduce, simply clone the repo and run simulations through the commandline below. Of course VUnit must be installed (5.0.0.dev7). I am currently using NVC version f880ffc (from #1512 ). I notice that NVC reorts significantly lower statement and branch coverage than modelsim - for some entities even no coverage at all.
Example - olo_fix_sample_hold:
** Note: code coverage results for: olo_fix_sample_hold.vhd
** Note: statement: N.A.
** Note: branch: N.A.
** Note: toggle: 80.0 % (4/5)
** Note: expression: N.A.
** Note: FSM state: N.A.
** Note: functional: N.A.
** Note: average: 80.0 % (4/5)
Modelsim reports the following:
=================================================================================
=== File: /home/oli/work/olo/open-logic/src/base/vhdl/olo_base_sample_hold.vhd
=================================================================================
Enabled Coverage Bins Hits Misses Coverage
---------------- ---- ---- ------ --------
Branches 5 5 0 100.00%
Statements 4 4 0 100.00%
Reproduction
To reproduce:
- Navigate to [open-logic-root]/sim
- Execute
python3 run.py --nvc --coverage -p 16
- Execute
python3 run.py --modelsim --coverage
- Execute 'python3 AnalyzeCoverage.py`
On your disk you now have two files inside the [open-logic-root]/sim folder to compare:
- nvc_coverage.txt (nvc)
- coverage_report.txt (modelsim)
In many cases NVC report code uncovered that I am pretty sure really is covered by the test-benches.
Could you look into it? I think Open Logic serves as a good test-load for NVC coverage.
I am integrating NVC Code Coverage into the Open Logic design flow. It'd be great to have an open-source tool for coverage reporting - so first of all: Thank you for your efforts!
I have set-up a branch to implement this Open Logic feature/nvc-coverage. I pushed everything needed to reproduce the issue reported here.
To reproduce, simply clone the repo and run simulations through the commandline below. Of course VUnit must be installed (5.0.0.dev7). I am currently using NVC version f880ffc (from #1512 ). I notice that NVC reorts significantly lower statement and branch coverage than modelsim - for some entities even no coverage at all.
Example - olo_fix_sample_hold:
Modelsim reports the following:
Reproduction
To reproduce:
python3 run.py --nvc --coverage -p 16python3 run.py --modelsim --coverageOn your disk you now have two files inside the [open-logic-root]/sim folder to compare:
In many cases NVC report code uncovered that I am pretty sure really is covered by the test-benches.
Could you look into it? I think Open Logic serves as a good test-load for NVC coverage.