RE: [sv-ec] Vector bin in a cross cover point

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Sun Apr 28 2013 - 07:12:27 PDT
This is going back over two years, but I was looking over some old mail.

Looking at this again, I still don't see that it can't be done.

According to my understanding of the LRM, if you would write

A: coverpoint a_var { bins yy[] = { [0:9] }; }  //creates 10 bins yy[0] - yy[9]
B: coverpoint b_var { bins bb[] = { [0:5] }; }  //creates 6 bins bb[0] - bb[5]  (I need only first 6 values of b_var to be present the cross)
CC: cross A,B;

you would in fact get those 60 bins.

Regards,
Shalom

> -----Original Message-----
> From: Raghavender Reddy Paltammagari [mailto:reddyrag@cadence.com]
> Sent: Monday, February 14, 2011 16:36
> To: Bresticker, Shalom; SV_EC List
> Subject: RE: [sv-ec] Vector bin in a cross cover point
> 
> Hi Shalom,
> 
>    I agree that if you don't specify any user-defined bins in the cross
> coverage then it will create one bin for each and every combination.
> 
> But how can I specify user-defined bins in cross such that one bin is
> created for each and every combination?
> 
> Also, if I don't need all combinations of b_var to be crossed with
> coverpoint labeled as A, I can modify your example as below:
> 
> bit [31:0] a_var;
> bit [3:0] b_var;
> 
> covergroup cov3 @(posedge clk);
>   A: coverpoint a_var { bins yy[] = { [0:9] }; }  //creates 10 bins
> yy[0] - yy[9]
>   B: coverpoint b_var { bins bb[] = { [0:5] }; }  //creates 6 bins
> bb[0] - bb[5]  (I need only first 6 values of b_var to be present the
> cross)
>   CC: cross b_var, A  { bins bbyy = binsof(A.yy) && binsof(B.bb);
> //creates single bin for 60 combinations
> endgroup
> 
> The cross here generates a single bin for bbyy and will be shown as hit
> if atleast one of the 60 (10x6) combinations is hit.
> 
> How do I create separate bins for each of these 60 combinations?
> 
> If I can declare bbyy as a dynamic array then we can have separate bins
> created for the 60 combinations.
> 
> Pls let me know if something is not clear.
> 
> Thanks,
> Raghu.
> 
> -----Original Message-----
> From: Bresticker, Shalom [mailto:shalom.bresticker@intel.com]
> Sent: Monday, February 14, 2011 11:26 AM
> To: Raghavender Reddy Paltammagari; SV_EC List
> Subject: RE: [sv-ec] Vector bin in a cross cover point
> 
> Hi,
> 
> I am not sure this is correct.
> 
> In 19.6, you have, for example:
> 
> "bit [3:0] a, b;
> 
> covergroup cov @(posedge clk);
>   aXb : cross a, b;
> endgroup
> 
> The coverage group cov in the example above specifies the cross
> coverage of two 4-bit variables, a and b.
> SystemVerilog implicitly creates a coverage point for each variable.
> Each coverage point has 16 bins, namely auto[0]...auto[15].
> The cross of a and b (labeled aXb), therefore, has 256 cross products,
> and *EACH CROSS PRODUCT IS A BIN OF AXB*."
> 
> Similarly afterwards,
> 
> bit [31:0] a_var;
> bit [3:0] b_var;
> 
> covergroup cov3 @(posedge clk);
>   A: coverpoint a_var { bins yy[] = { [0:9] }; }
>   CC: cross b_var, A;
> endgroup
> 
> The coverage group cov3 crosses variable b_var with coverage point A
> (labeled CC). Variable b_var automatically creates 16 bins
> (auto[0]...auto[15]). Coverage point A explicitly creates 10 bins
> (yy[0]...yy[9]).
> 
> THE CROSS OF TWO COVERAGE POINTS CREATES 16 ª 10 = 160 CROSS PRODUCT
> BINS, NAMELY THE FOLLOWING PAIRS:
> 
> <auto[0], yy[0]>
> <auto[0], yy[1]>
> ...
> <auto[0], yy[9]>
> <auto[1], yy[0]>
> ...
> <auto[15], yy[9]>"
> 
> So it does seem that every combination creates a separate bin by
> default.
> What is not clear is how these bins are named and how they can be
> accessed.
> This was discussed recently.
> 
> Regards,
> Shalom
> 
> 
> > -----Original Message-----
> > From: Raghavender Reddy Paltammagari [mailto:reddyrag@cadence.com]
> > Sent: Sunday, February 13, 2011 8:56 PM
> > To: Bresticker, Shalom; neil.korpusik@oracle.com; SV_EC List
> > Cc: Raghavender Reddy Paltammagari
> > Subject: RE: [sv-ec] Vector bin in a cross cover point
> >
> > Hi Shalom,
> >
> >    Let's consider below example:
> >
> > class c3;
> >     rand bit [1:0] one;
> >     rand bit [3:0] two;
> >
> >     covergroup cg;
> >       cp1: coverpoint one {
> > 		bins A[] = {[0:3]};
> > 		    }
> >
> >       cp2: coverpoint two{
> > 		bins low[]  = {[0:5]};
> > 		bins mid[]  = {[6:10]};
> > 		bins high[] = {[11:15]};
> >                    }
> >
> >       onetwo: cross cp1, cp2 {
> >             bins x2 = binsof(cp1) && binsof(cp2.mid);
> > 	}
> >       endgroup:cg
> >
> >     function new();
> >       cg = new();
> >       //cg.set_inst_name("akhil");
> >     endfunction
> > enclass
> >
> > In this example, 	the number of bins created for coverpoint one is 4
> > (A[0], A[1], A[2] and A[3])
> >
> > - The number of bins created for cross coverpoint cp1, cp2(labeled as
> > onetwo) is 1.
> >
> > - The number of possible values for the cross "binsof(cp1) &&
> > binsof(cp2.mid)" is 20 (4 for cp1 multiplied with 5 for cp2.mid)
> >
> > - A single bin is created for all these 20 values. If atleast one of
> > these 20 values is hit then this covergroup will be shown as hit.
> >
> > - I want to see different bins for each of these 20 values.
> >
> > - If I can use a vector bin in a cross i.e. a dynamic array when
> > specifying bins construct in a cross coverpoint then I can create 20
> > different bins for these 20 values.
> >
> > - Unfortunately vector bin (or) a dynamic array in bins construct is
> > not specified in IEEE Std 1800-2009 Page: 498, Syntax 19-4.
> >
> > - As a result tools doesn't support this and I can't use a dynamic
> > array when specifying bins x2 as below:
> > onetwo: cross cp1, cp2 {
> >             bins x2[] = binsof(cp1) && binsof(cp2.mid);    //note the
> > dynamic array for x2 (We can't use this as of today)
> > 	}
> >
> > Note the usage of dynamic array in bins construct for normal
> coverpoint
> > cp1. Syntax 19-2 for normal coverpoint allows this.
> >
> >
> > Here is the difference between two syntaxes:
> > Syntax 19-4 for cross coverpoints:-
> > bins_selection ::= bins_keyword bin_identifier = select_expression [
> > iff ( expression ) ]  //note there is no dynamic array after the
> > bin_identifier
> >
> > Syntax 19-2 for normal coverpoints:-
> > bins_or_options ::=
> > coverage_option
> > | [ wildcard ] bins_keyword bin_identifier [ [ [ expression ] ] ] = {
> > open_range_list } [ iff ( expression) ]  //note the dynamic array
> after
> > bin_identifier
> >
> > Pls let me know if something is not clear.
> >
> >
> > Thanks,
> > Raghu.
> 
> ---------------------------------------------------------------------
> 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 Sun Apr 28 07:13:20 2013

This archive was generated by hypermail 2.1.8 : Sun Apr 28 2013 - 07:13:25 PDT