Hi all:
I should have noted that the desired ordering is easily achieved with either ordering of with expression and bin distribution if an unsized vector bin is used. On further thought it seems the example below is a poor choice for the use of sized vector bins.
In thinking about a reason to do bin distribution last in the case of a with expression it seems that a with expression is constructive while ignore bins is destructive. Meaning that when I think about how to distribute the results of a with expression I should have some idea of the output and can base my distribution off that. In the case of ignore bins I have created my distribution but just want to remove a few items. I asked a few internal folks for their thoughts on this issue. The response was that sized vector bins aren't often used, but the ordering of expression application followed by bin distribution seemed like the correct path to them.
I also asked for their thoughts regarding moving functions to create cross bins inside the cross "scope." Here is the answer I received: "As for the functions being declared within the cross, you mention that the function wouldn't be visible outside the cross, but you don't say if the function inside the cross would be able to access variables outside the covergroup (class members, etc). If it can, the cross function could just call a member function and that would solve the reusability issue. More generally, I think it likely that the cross function might want to access member variables, so if this technique would disallow that access, I think we should leave the functions outside the covergroup. I can live with the scope resolution if need be."
If possible I would like to discuss these issues in the meeting today. I will update the proposal based on the conclusion of those discussions.
Thanks,
Scott
> -----Original Message-----
> From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of
> Little Scott-B11206
> Sent: Tuesday, March 15, 2011 8:03 AM
> To: sv-ec@eda.org
> Cc: Fais Yaniv-RM96496
> Subject: [sv-ec] Covergroup fixed-size vector bin creation
>
> Hi all:
>
> In the meeting yesterday we discussed the order in which the bin
> distribution and with expression application should be done when
> creating fixed-size vector bins. Below is an example of where this
> would matter.
>
> bit [3:0] coverpoint b {
> bins onehot[4] = b with $onehot(item);
> }
>
> If we apply the with function and then distribute to the bins we get
> what is probably the intended result of one item/bin. If we distribute
> then apply the with function we end up with three bins,
> <0001,0010>,<0100>,<1000>. The fourth bin is emptied by the application
> of the with expression and is excluded from coverage.
>
> In the meeting, I had stated that I thought the application of the with
> expression should apply after the distribution of bins. This would be
> in line with how ignore bins are handled (see 19.5.4). Based on the
> above example it seems like that is the wrong thing to do. Do folks
> recall how the decision was made regarding ordering between applying
> ignore bins and distribution? Is there another example that shows why
> distribution before application of the with expression is desirable?
>
> Thanks,
> Scott
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Mar 28 07:31:55 2011
This archive was generated by hypermail 2.1.8 : Mon Mar 28 2011 - 07:32:00 PDT