How to write wildcardbins using range?

I know its a basic question tried to figure but couldn’t. I am trying to write a range for wild card bins. I have written the following cover group. If we have fewer wildcard bins It would be okay to use separate bins but if we have a lot of bins lets say from 40-5F. I feel it’s not preferable to write individual wildcard bins so trying to write a range of wildcard bins from 40-5F. Any help would be appreciated. Thank you

covergroup try @(posedge clk);    
 verify: coverpoint {addr[14:7]}{
        wildcard bins a = {8'b??11???1} // 49
        wildcard bins b = {8'b?1??1?1?} //4A
        wildcard bins c = {8'b?1??1?11} //4B
        } 
 endgroup: try

In reply to perkin:

There is no feature that allows you to specify a range of wildcards. Each wildcard is a shortcut for a set of bin values. You can create a function that builds a set of values and stores them in an array, and then specify that array as the bin set.

In reply to dave_59:

Hi Dave ,

Would like your views on the following ::

(1)

Each wildcard is a shortcut for a set of bin values

The ? / X / Z mentioned in the bin set itself acts as a range .

Is this why an explicit range using ? / X / Z in both lower and upper bounds isn’t valid ?

OR Are there any possible side-effects of using ? / X / Z in both lower and upper bounds ?

(2)

There is no feature that allows you to specify a range of wildcards

Would it be possible to have this explicitly mentioned in the future versions of the LRM ? The 2017 - LRM has no mention stating the same directly or indirectly .

An alternative solution to the array as bin set would be using with_clause ::


 cp : coverpoint ( addr[14:7] ) 
      {   

 wildcard  bins  wild[]  = { 8'b010?_???? }  with ( item  inside { [ 8'h40 : 8'h5F ] } ) ; 

     //   Same  as  writing  :: 
     // wildcard  bins  wild[]  = { 8'b010?_???? } ;

      }