SV transition coverage of non-contiguous values

Hello,

While creating a covergroup (and coverpoint) using transition coverage I’ve encounter problem,

For example you want to cover the following transition

{2,4,7} → {3,5,9} → {2,4,7}

If the values were contiguous I believe this should be straightforward as


   covergroup transition with function sample(int x);

      trans_cp: coverpoint x {
         bins T = ([0:2] => [3:4] => [0:2]);
      }
   endgroup
   //but I've tried 
   covergroup transition with function sample(int x);

      trans_cp: coverpoint x {
         bins T = ('{2,4,7} => '{3,5,9} => '{2,4,7});
         //also this without success
         //bins T = ({2,4,7} => {3,5,9} => {2,4,7});
      }
   endgroup


Somehow the simulators (Questa and VCS) believe this is an attempt for a concatenation “Illegal concatenation of an unsized constant.” but the intent is just list the values of X for the transitions, am I missing something fundamental here? is there any way to list the “sparse” values in the coverpoint?

In reply to rgarcia07:

Hello,
While creating a covergroup (and coverpoint) using transition coverage I’ve encounter problem,
For example you want to cover the following transition
{2,4,7} → {3,5,9} → {2,4,7}
If the values were contiguous I believe this should be straightforward as


covergroup transition with function sample(int x);
trans_cp: coverpoint x {
bins T = ([0:2] => [3:4] => [0:2]);
}
endgroup
//but I've tried 
covergroup transition with function sample(int x);
trans_cp: coverpoint x {
bins T = ('{2,4,7} => '{3,5,9} => '{2,4,7});
//also this without success
//bins T = ({2,4,7} => {3,5,9} => {2,4,7});
}
endgroup

Somehow the simulators (Questa and VCS) believe this is an attempt for a concatenation “Illegal concatenation of an unsized constant.” but the intent is just list the values of X for the transitions, am I missing something fundamental here? is there any way to list the “sparse” values in the coverpoint?

Found it seems the “{}” are not required


   covergroup transition with function sample(int x);

      trans_cp: coverpoint x {
         bins T = (2,4,7 => 3,5,9 => 2,4,7);
      }
   endgroup

You have to love SV and its syntax :)