# Is there any efficient way to create all combination of cross coverage

**URL:** <https://verificationacademy.com/forums/t/is-there-any-efficient-way-to-create-all-combination-of-cross-coverage/47687>\
**Category:** Coverage\
**Tags:** covergroup, SystemVerilog, cross-coverage\
**Created:** [June 22, 2024, 12:38pm UTC](https://verificationacademy.com/forums/t/is-there-any-efficient-way-to-create-all-combination-of-cross-coverage/47687 "2024-06-22T12:38:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NewToSV](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/n/c57346/32.png) [@NewToSV](https://verificationacademy.com/forums/u/NewToSV)\
**Post date:** [June 22, 2024, 12:38pm UTC](https://verificationacademy.com/forums/t/is-there-any-efficient-way-to-create-all-combination-of-cross-coverage/47687/1 "2024-06-22T12:38:42Z")

</div>

I would like to know that how to generate cross coverage of all the combination of the coverpoints in efficient way.

For example

```auto
covergroup combination;
    a1: coverpoint a;
    b1: coverpoint b;
    c1: coverpoint c;

    // cross coverage
    a1xb1: cross a1, b1;
    a1xc1: cross a1, c1;
    b1xc1: cross b1, c1;
    a1xb1xc1: cross a1, b1, c1;
endgroup

```

For the real case I meet, there are 5 coverpoints in the group, which means 5!-1-5 = 114 combinations. Is there any method to generate the cross coverage part automatically without directly write them out explicitly？

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [June 23, 2024, 1:52pm UTC](https://verificationacademy.com/forums/t/is-there-any-efficient-way-to-create-all-combination-of-cross-coverage/47687/2 "2024-06-23T13:52:18Z")

</div>

The crosses `a1xb1`, `a1xc1`, and `b1xc1` are redundant if you also have the cross `a1xb1xc1`. But if you have more complex bins than you have shown, that might not be the case.
