[sv-ec] Query on bin value

From: Swapnajit Chakraborti <swapnaj@cadence.com>
Date: Fri Jul 23 2010 - 04:37:25 PDT

I have query regarding use of hierarchical names as bin value of a coverpoint.

The LRM says the following:
"The open_range_list used to specify the set of values associated with a bin shall
be constant expressions (see 11.2.1), instance constants (for classes only), or non-ref arguments to the coverage
group."

Now, if I have something like below, should "myt.xx" be treated as instance constant/constant expression
and thus allowed in bin value expression. Or will it be considered as hierarchical expression and hence should be treated as illegal.

module test;
   typedef struct { int xx; } my_t;
   class item_c;
      const my_t myt = '{xx:6};
      covergroup data_cg;
          DATA: coverpoint data{
                 bins chid[] = {[0:myt.xx]}; // This is a member of a const struct. Should this be allowed as instance const or const expression or illegal?
          }
      endgroup : data_cg
      ...
   endclass : item_c
....
endmodule : test

Regds,
Swapnajit

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Jul 23 04:37:49 2010

This archive was generated by hypermail 2.1.8 : Fri Jul 23 2010 - 04:38:07 PDT