RE: [sv-ec] [SV-ec] Mantis 3763: Any reason why formal argument name cannot be of same name as covergroup label?

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Mon Dec 10 2012 - 06:03:03 PST
An identifier should have a single meaning within a particular scope.
Its meaning should not be context-sensitive.

Shalom

From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Ben Cohen
Sent: Monday, December 10, 2012 05:05
To: sv-ec@eda.org; sv-ac@eda-stds.org
Subject: [sv-ec] [SV-ec] Mantis 3763: Any reason why formal argument name cannot be of same name as covergroup label?

http://www.eda-stds.org/svdb/view.php?id=3763
Aside from style, why are we putting the restriction?
Is there a restriction?
If a simulator accepts the example originally shown (see below) would that be an error?
It seems that a compiler should be able to differentiate between a formal argument name and a label.

covergroup cg ( ref int x , ref int y, input int c);
coverpoint x; // creates coverpoint "x" covering the formal "x"
x: coverpoint x; // INVALID: coverpoint label "x" already exists
b: coverpoint y; // creates coverpoint "b" covering the formal "y"
c: coverpoint x; // creates coverpoint "c" covering the formal "x"
option.weight = c; // set weight of "cg" to value of formal "c"

BTW, I am the one who initiated the mantis, but now, after a revisit of some issues, I am questioning its validity.
I am sure that the mantis was challenged and approved for a good reason.

Ben Cohen

--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
---------------------------------------------------------------------
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 Mon Dec 10 06:03:56 2012

This archive was generated by hypermail 2.1.8 : Mon Dec 10 2012 - 06:04:13 PST