Coverpoint to hit coverpoint

Hi, I wanted to make a coverpoint which will hit , if one of any coverpoint is hit in the regressions
Something like this - :

module test;
bit [7:0] a,b,c;
reg [0:2] values[$]= '{3,4,5};

covergroup cg;
cover_point_a : coverpoint a {
bins tran_333 = {3};
}
cover_point_b : coverpoint b {
bins tran_334 = {4};
}
cover_point_c : coverpoint c {
bins tran_334 = {5};
}
endgroup

Code any coverpoint name : cover_point_d which should be hit if either cover_point_a ,cover_point_b,cover_point_c is hit

In reply to Harjot:

The brute force answer to your question is

cover_point_d : coverpoint a==3 || b==4 || c == 5 {
bins abc = {1}; 
}

But why would you want to do this? It will slightly raise your coverage results when you have less than 100% coverage, and not change what is needed to reach 100% coverage.

In reply to dave_59:

Hi Dave,

The intention is to merge some coverpoints and use only that megred coverpoint in vplan.
Some coverpoint in our project has same functional meaning. These coverpoints are already coded.So wanted to use a single coverpoint to be tracked which keeps track of all.
This is a basic snippet i have made , let say if there are 15 coverponts to merge ,i have to copy logic of every coverpoint and give || operation.

Is there a way, i can track ysing the coverpoint name itself cover_point_a,cover_point_b ?

In reply to Harjot:

This approach doesn’t look right to me.


covergroup cg;
cover_point_a : coverpoint a {
bins tran_333 = {3};
}
cover_point_b : coverpoint b {
bins tran_334 = {4};
}
cover_point_c : coverpoint c {
bins tran_334 = {5};
}
cover_point_d : coverpoint a==3 || b==4 || c == 5 {
bins abc = {1}; 
}
endgroup

If
“a = 3” then cover_point_a is 100%,
“b” never have value 4 → cover_point_b is 0%
“c” never have value 5 → cover_point_c is 0%
but still cover_point_d is 100% as “a” was 3.

so if you track cover_point_d as replacement of cover_point_a,cover_point_b,cover_point_c then it isn’t correct.


https://www.linkedin.com/in/patel-rahulkumar/

In reply to Harjot:

I understand your intent. Without knowing how it is that you have multiple coverpoints covering the same functionality and only some of them would be hit, it is difficult to suggest something better than my brute force approach. Covergroups have a limited set of functionality. You might have to create some logic outside of them to make your task easier.