[sv-ec] Re: [sv-bc] sv-bc 19.5 Defining coverage points // Error in eample

From: ben cohen <hdlcohen@gmail.com>
Date: Mon Sep 12 2011 - 00:38:46 PDT

I wrote a mantis on this for sv-bc
http://www.eda-stds.org/svdb/view.php?id=3763
 Summary0003763: Error in example for 19.5 Defining coverage point
DescriptionThe example covergroup cg ( ref int x , ref int y, input int c);
has an error in that the formal argument “c” (of type int) is also used as a
label within the definition of the covergroup in
c: coverpoint x; // creates coverpoint "c" covering the formal "x"

On Sun, Sep 11, 2011 at 11:57 PM, Bresticker, Shalom <
shalom.bresticker@intel.com> wrote:

> You need to also change the comment that says, 'creates coverpoint "c"'.**
> **
>
> ** **
>
> Shalom****
>
> ** **
>
> *From:* ben cohen [mailto:hdlcohen@gmail.com]
> *Sent:* Monday, September 12, 2011 9:54 AM
> *To:* Bresticker, Shalom
> *Cc:* SV_EC List
> *Subject:* Re: [sv-bc] sv-bc 19.5 Defining coverage points // Error in
> eample****
>
> ** **
>
> Shalom, ****
>
> I don't know, but the issue is that the LRM is incorrect. The ****
>
> c: coverpoint x; // creates coverpoint "c" covering the formal "x"****
>
> should have a different label, something like ****
>
> c_cvpt: coverpoint x; // creates coverpoint "c" covering the formal "x"***
> *
>
> ** **
>
> As to what my simulator does and the error it gives is a tool issue that
> I'll take with that particular vendor. ****
>
> For now, I want the LRM to be fixed. Do you want me to write a mantis,
> or can you do it. ****
>
> Thanks, ****
>
> Ben Cohen ****
>
> ** **
>
> On Sun, Sep 11, 2011 at 11:38 PM, Bresticker, Shalom <
> shalom.bresticker@intel.com> wrote:****
>
> I understand the error message about c.****
>
> But why does it complain about rdwr?****
>
> ****
>
> Shalom****
>
> ****
>
> ****
>
> *From:* owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] *On Behalf Of *ben
> cohen
> *Sent:* Sunday, September 11, 2011 1:45 PM
> *To:* sv-bc@eda.org; sv-ac@eda-stds.org
> *Subject:* [sv-bc] sv-bc 19.5 Defining coverage points // Error in eample*
> ***
>
> ****
>
> Ref: Example in 19.5, pdf page 529 of draft 2. ****
>
> Compilation of the example in 19.5 shows errors not mentioned in the
> example. ****
>
> I commented out those errors mentioned in the code. ****
>
> Attached are 2 files,****
>
> - cvg_weight_err.sv : LRM code with pointed lrm errors commented out***
> *
>
> -cvgt_weight.sv : Modified code. ****
>
> 19.5 Defining coverage points****
>
> 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"*****
>
> d: coverpoint x {****
>
> option.weight = 2; // set the weight of coverpoint "d"****
>
> }****
>
> d.option.weight = 2; // INVALID use of "d", also syntax error****
>
> cross x, y { // Creates implicit coverpoint "y" covering****
>
> // the formal "y". Then creates a cross of****
>
> // coverpoints "x", "y"****
>
> *option.weight = c; // set weight of cross to value of formal "c"*****
>
> }****
>
> b: cross y, x; // INVALID: coverpoint label "b" already exists****
>
> endgroup****
>
> --****
>
> Compiled code (errors mentioned commented out) ****
>
> 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; // Line 18: set weight of "cg" to value of
> formal "c"****
>
> d: coverpoint x {****
>
> option.weight = 2; // set the weight of coverpoint "d"****
>
> }****
>
> //d.option.weight = 2; // INVALID use of "d", also syntax error***
> *
>
> cross x, y { // Creates implicit coverpoint "y" covering****
>
> // the formal "y". Then creates a cross of****
>
> // coverpoints "x", "y"****
>
> option.weight = c; // LINE 26: set weight of cross to value of
> formal "c"****
>
> }****
>
> // b: cross y, x; // INVALID: coverpoint label "b" already exists*
> ***
>
> endgroup****
>
> Error pointed by compiler: ****
>
> Error: cvg_weight_err.sv(18): Cannot assign an unpacked type to a packed
> type****
>
> Error: cvg_weight_err.sv(26): Cannot assign an unpacked type to a packed
> type****
>
> ****
>
> ---****
>
> Fixing line 18 and 21 makes the code simulate OK. ****
>
> The fix ****
>
> 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_cvpt: coverpoint y; // creates coverpoint "b" covering the formal
> "y"****
>
> * c_cvpt:* coverpoint x; // creates coverpoint "c" covering the
> formal "x"****
>
> option.weight = c; // set weight of "cg" to value of formal "c"***
> *
>
> d_cvpt: coverpoint x {****
>
> option.weight = 2; // set the weight of coverpoint "d"****
>
> }****
>
> //d.option.weight = 2; // INVALID use of "d", also syntax error***
> *
>
> cross x, y { // Creates implicit coverpoint "y" covering****
>
> // the formal "y". Then creates a cross of****
>
> // coverpoints "x", "y"****
>
> option.weight = c; // set weight of cross to value of formal
> "c"****
>
> }****
>
> // b: cross y, x; // INVALID: coverpoint label "b" already exists*
> ***
>
> endgroup****
>
> cg cg_inst=new(addr, data, cache); ****
>
> Ben Cohen SystemVerilog.us ****
>
>
> --
> 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. ****
>
> ---------------------------------------------------------------------
> 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.****
>
> ** **
> ---------------------------------------------------------------------
> 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 Sep 12 00:39:54 2011

This archive was generated by hypermail 2.1.8 : Mon Sep 12 2011 - 00:40:07 PDT