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

UVVM-based testbenches and coverage #906

Closed
yikkrubz opened this issue Jun 30, 2024 · 0 comments
Closed

UVVM-based testbenches and coverage #906

yikkrubz opened this issue Jun 30, 2024 · 0 comments

Comments

@yikkrubz
Copy link

When some UVVM-based testbenches are simulated with coverage enabled, nvc asks me to file a bug report.
For example, simulating the testbench uart_vvc_demo_tb, included with the UVVM distribution in the directory bitvis_uart, triggers the message.

nvc -a src/uart_pif_pkg.vhd
nvc -a src/uart_pif.vhd
nvc -a src/uart_pkg.vhd
nvc -a src/uart_core.vhd
nvc -a src/uart.vhd
nvc -a tb/uart_vvc_demo_th.vhd
nvc -a tb/uart_vvc_demo_tb.vhd
nvc -e --cover uart_vvc_demo_tb
** Note:

     *****************************************************************************************************
      This is a *** LICENSED PRODUCT *** as given in the LICENSE.TXT in 
     the root directory.
     *****************************************************************************************************

Function SHOW_LICENSE [T_VOID return BOOLEAN] at ../src/license_pkg.vhd:44
Package UVVM_UTIL.METHODS_PKG-body at ../src/methods_pkg.vhd:2987
Package BITVIS_VIP_SBI.TD_TARGET_SUPPORT_PKG-body at ../../uvvm_vvc_framework/src_target_dependent/td_target_support_pkg.vhd:148
Package BITVIS_VIP_SBI.TD_VVC_FRAMEWORK_COMMON_METHODS_PKG-body at ../../uvvm_vvc_framework/src_target_dependent/td_vvc_framework_common_methods_pkg.vhd:439
Process (init) at tb/uart_vvc_demo_tb.vhd:44
** Fatal: invalid type kind T_ARRAY in range_of
[0x1061f9027] diag_femit+0xe27
[0x1060dd7bd] fatal_trace+0xcd
[0x106175eee] range_of+0x11e
[0x1061bbe52] lower_toggle_item_for+0x1e2
[0x1061b5371] lower_toggle_coverage+0x131
[0x1061c12c9] lower_instance+0x2659
[0x10615e354] elab_lower+0x54
[0x10615d125] elab_architecture+0x785
[0x10615f6e5] elab_stmts+0x1225
[0x10615d13b] elab_architecture+0x79b
[0x10615f6e5] elab_stmts+0x1225
[0x10615d13b] elab_architecture+0x79b
[0x10615f6e5] elab_stmts+0x1225
[0x10615d13b] elab_architecture+0x79b
[0x10615b5aa] elab+0x96a
[0x1060d58e0] process_command+0x1060
[0x1060d4268] main+0x578

Please report this bug at https://github.com/nickg/nvc/issues

nvc 1.13-devel (1.12.0.r127.g326e923f) (Using LLVM 18.1.3)
macos 14.5 intel

@nickg nickg closed this as completed in 95ad556 Jun 30, 2024
Blebowski pushed a commit to Blebowski/nvc that referenced this issue Jul 7, 2024
Blebowski pushed a commit to Blebowski/nvc that referenced this issue Jul 15, 2024
nickg pushed a commit that referenced this issue Jul 18, 2024
* src: Move toggle coverage emit (recursive array traversal) to "cov-data" from lower.

* src: Linearize control flow in cover_add_toggle_items_for.

* src, test: Convert toggle coverage to separate cover_item for 0->1 and 1->0.

* src: Set "num" by default to 1 -> Becomes valid for statements. Simplify cover chain append logic for COV_ITEM_STMT.

* src: Move "num" setting for COV_ITEM_TOGGLE to better place.

* WIP: Branch coverage - Conversion to counters.

* src: Convert branch items fully to single item per covered item in reports too.

* src: Move bin name append for toggle items to cover_add_item.

* src: Move FSM state coverage logic to "cover" and make it counter, not flag.

* src: Fix typo in Button that gives you coverage exclude command.

* src: Move "num" setting for COV_ITEM_TOGGLE to better place.

* WIP: Branch coverage - Conversion to counters.

* src: Convert branch items fully to single item per covered item in reports too.

* src: Move bin name append for toggle items to cover_add_item.

* src: Port fixes from #909 and #906 to coverage refactoring.

* src, test: Rework expression coverage conversion to counters.

* src: Unify reporting of COV_ITEM_FUNCTIONAL to use new conversion to cover_chain_t.

* src: Remove Exclude mask from cov_item_t, now handled by single flag.

* src: Fix build on MACOS.

* src, test: Fix leak in the branch coverage.

* src: Rename "num" to "consecutive" to better correspond to its meaning.

* src, test: Get rid of the BIN in the exclude file completely.

* src, test: Clarify that simultaneous covered + excluded will result in covered.

* src: Unify "cover_add_*" API towards lower.

* src, test: Merge VCODE_OP_COVER_STMT, VCODE_OP_COVER_BRANCH and VCODE_OP_COVER_EXPRESSION.

* src, test: Rename "STATE" to "BIN_STATE" to have the same naming as rest of bins.

* NEWS, www: Update documentation and changes.

* Apply comments from review.

* Revert "src, test: Merge VCODE_OP_COVER_STMT, VCODE_OP_COVER_BRANCH and VCODE_OP_COVER_EXPRESSION."

This reverts commit 9daa3dc.

* src: Remove unused variable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant