Right, a typedef would be needed in this case to get to a casting_type.
However, a simple integer can be used to size the cast of an integral expression, so you could do
d: coverpoint 8'(y[31:24])
Do anyone remember why the type declaration was desirable?
Dave
Mentor Graphics
From: Arturo Salz [mailto:Arturo.Salz@synopsys.com]
Sent: Friday, January 27, 2012 7:58 PM
To: Rich, Dave; Miller Hillel-R53776; Little, Scott; sv-ec@eda.org
Subject: RE: Mantis 2506 BNF for coverpoint
Dave,
The cast argument was the rationale I used for not requiring the type declaration. We did discuss this in the meeting and it was decided that the type declaration was desirable. Also, you'd probably have to declare the type as opposed to inlining the bit field as you have done below.
Arturo
From: owner-sv-ec@eda.org<mailto:owner-sv-ec@eda.org> [mailto:owner-sv-ec@eda.org]<mailto:[mailto:owner-sv-ec@eda.org]> On Behalf Of Rich, Dave
Sent: Friday, January 27, 2012 3:37 PM
To: Miller Hillel-R53776; Little, Scott; sv-ec@eda.org<mailto:sv-ec@eda.org>
Subject: [sv-ec] RE: Mantis 2506 BNF for coverpoint
Hillel,
I think we are all in agreement that the proposed BNF is wrong. This will need to become a ballot comment.
I'm not sure if the data is required. Why can't you use a cast?
d: coverpoint bit [7:0]'( y[31:24]); // creates coverpoint "d" covering ...
Dave
Mentor Graphics
From: Miller Hillel-R53776 [mailto:r53776@freescale.com]<mailto:[mailto:r53776@freescale.com]>
Sent: Friday, January 27, 2012 9:23 AM
To: Rich, Dave; Little, Scott; sv-ec@eda.org<mailto:sv-ec@eda.org>
Subject: RE: Mantis 2506 BNF for coverpoint
Rich,
I believe 2506 turns the coverpoint label into a typed variable, I don't think we can call it a label anymore. Correct me if I have got this wrong.
Therefore if there is a data type there needs to be a variable identifier following it.
So: If there is a type it needs to be followed by a variable identifier.
Regards
Hillel
From: Rich, Dave [mailto:Dave_Rich@mentor.com]<mailto:[mailto:Dave_Rich@mentor.com]>
Sent: Friday, January 27, 2012 11:14 AM
To: Miller Hillel-R53776; Little, Scott; sv-ec@eda.org<mailto:sv-ec@eda.org>
Subject: RE: Mantis 2506 BNF for coverpoint
Hillel,
The current BNF allows
bit [7:0] a&b // no label
are you suggesting this?
cover_point ::= // from A.2.11
[[data_type_or_implicit ] cover_point_identifier : ] coverpoint expression [ iff ( expression ) ]
This means if you supply a data type, you must also supply a label
bit [7:0] ab : a&b
Dave
Mentor Graphics
From: Miller Hillel-R53776 [mailto:r53776@freescale.com]<mailto:[mailto:r53776@freescale.com]>
Sent: Friday, January 27, 2012 9:01 AM
To: Little, Scott; Rich, Dave; sv-ec@eda.org<mailto:sv-ec@eda.org>
Subject: RE: Mantis 2506 BNF for coverpoint
It's not consistent with p1800's typed variable syntax. If we are to treat coverpoints as typed variables, let's be consistent.
From: owner-sv-ec@eda.org<mailto:owner-sv-ec@eda.org> [mailto:owner-sv-ec@eda.org]<mailto:[mailto:owner-sv-ec@eda.org]> On Behalf Of Little, Scott
Sent: Friday, January 27, 2012 10:53 AM
To: Rich, Dave; sv-ec@eda.org<mailto:sv-ec@eda.org>
Subject: [sv-ec] RE: Mantis 2506 BNF for coverpoint
Hi Dave,
Thanks. This point has been raised to me as well as a couple of other fixes that are needed.
I would prefer to adjust the BNF to be consistent with the example as I believe that is a more intuitive way to write it. Do you foresee any issues with that BNF change?
cover_point ::= // from A.2.11
[ cover_point_identifier : ] data_type_or_implicit coverpoint expression [ iff ( expression ) ]
Thanks,
Scott
From: owner-sv-ec@eda.org<mailto:owner-sv-ec@eda.org> [mailto:owner-sv-ec@eda.org]<mailto:[mailto:owner-sv-ec@eda.org]> On Behalf Of Rich, Dave
Sent: Friday, January 27, 2012 8:48 AM
To: sv-ec@eda.org<mailto:sv-ec@eda.org>
Subject: [sv-ec] Mantis 2506 BNF for coverpoint
While I've got your attention for mantis 2506,
The BNF for a coverpoint says
cover_point ::= // from A.2.11
data_type_or_implicit [ cover_point_identifier : ] coverpoint expression [ iff ( expression ) ]
Yet a later example has
d: bit [7:0] coverpoint y[31:24]; // creates coverpoint "d" covering ...
Which is correct?
Dave Rich
Verification Technologist
Mentor Graphics Corporation
[Description: Description: Twitter-32]<http://www.twitter.com/dave_59>[Description: Description: Technorati-32]<http://go.mentor.com/drich>
-- This message has been scanned for viruses and dangerous content by MailScanner<http://www.mailscanner.info/>, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner<http://www.mailscanner.info/>, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner<http://www.mailscanner.info/>, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
This archive was generated by hypermail 2.1.8 : Fri Jan 27 2012 - 20:17:47 PST