[sv-ec] RE: Array variables in a covergroup_range_list

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Sun Aug 28 2011 - 06:26:49 PDT

I haven't been following this, but: constant expressions can include aggregate expressions, but in your example, valid_values is not a valid component of a constant expression. It is a variable that has a constant value, which is not the same thing.

11.2.1 says,
" The operands of a constant expression consist of constant numbers, strings, parameters, constant bit-selects and part-selects of parameters, constant function calls (see 13.4.3), and constant system function calls only."

That does not include variables.

Similarly, you can not write:

int value = 1;
logic [value:0] v;

Regards,
Shalom

> -----Original Message-----
> From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Little
> Scott-B11206
> Sent: Thursday, August 25, 2011 8:25 PM
> To: sv-ec@eda.org
> Cc: Jonathan Bromley
> Subject: [sv-ec] Array variables in a covergroup_range_list
>
> Hi all:
>
> In reviewing 2506 Jonathan arrived and a question that we haven't been able
> to work out. I was wondering if anyone can help us out here. Jonathan
> please let me know if I have mischaracterized your concern.
>
> It's not clear to me whether covergroup_range_list allows for arrays as part
> of the range. set_covergroup_expression::=covergroup_expression makes that
> a bit confusing, because it clearly indicates that covergroup_expression
> could return an array value - but is that also true for the singleton
> covergroup_expression in the production for covergroup_value_range?
>
> The restrictions on covergroup_expression are:
>
> Only constant expressions (see 11.2.1), instance constants (for an embedded
> covergroup), or non-ref arguments to the covergroup are allowed to be used
> as variables in a covergroup_expression.
>
> So, does 11.2.1 allows arrays?
>
> Would the following be allowed under the new restrictions? Would it be
> allowed in P1800-2009?
>
> int valid_values[3] = '{5, 7, 9};
> ...
> bins valid_set = {[1:4], valid_values};
>
> Note: I have uploaded a new version of 2506 that has the productions
> mentioned above included.
>
> Thanks,
> Scott

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Sun Aug 28 06:28:11 2011

This archive was generated by hypermail 2.1.8 : Sun Aug 28 2011 - 06:28:20 PDT