RE: [sv-ac] RE: [sv-ec] Mantis 2149 - Covergroups sample method with arguments

From: Arturo Salz <Arturo.Salz_at_.....>
Date: Tue Nov 13 2007 - 17:15:48 PST
Neil,

We did consider such an alternative but decided to discard it because it
opens the door to a whole range of issues that we thought would increase
confusion and LRM semantic verbiage. Here are some of the issues:

1) As you point out, the syntax would allow both an event (or block
event) and a function override.
2) Is the sample method within the scope of the covergroup yet visible
from outside - seems somewhat inconsistent.
3) Should the syntax be defined such that the sample method must be the
first item in the covergroup?
4) Can more than one sample method be defined - i.e., an overloaded
sample method?

Regarding the strobe/sample issue, the problem is that the strobe option
forces sampling in the postponed region but it only works with the
triggered samples. If users activate both event triggered and procedural
samples on the same object, it's not clear how it should work. I agree
that the LRM is not explicit in this area - it does state that the
sample ,method must be used to trigger a cover-group that doesn't
specify an event, but the converse restriction (a covergroup that
specifies an event may not call the sample method) is not listed in the
current version of the LRM. I believe this restriction makes sense.

	Arturo

-----Original Message-----
From: Neil.Korpusik@Sun.COM [mailto:Neil.Korpusik@Sun.COM] 
Sent: Tuesday, November 13, 2007 3:53 PM
To: Arturo Salz
Cc: David Scott; SV-EC; sv-ac@eda-stds.org
Subject: Re: [sv-ac] RE: [sv-ec] Mantis 2149 - Covergroups sample method
with arguments

As far as item #1 is concerned, I would like to offer the
following alternative.

   covergroup ct;
      function sample(int x);   // overrides the builtin method

I assume the reason why this was not proposed is that you don't
want to allow something like the following? I didn't notice anything
in the LRM what would disallow using @(posedge clk) and the builtin
strobe() method together today. Maybe this was an oversight in the
current
LRM. We should decide which way it should be, as part of this mantis
item
and make it more explicit.

   covergroup ct @(posedge clk);
      function sample(int x);


Neil



Arturo Salz wrote On 11/12/07 12:13 PM,:
> Scott,
> 
> My comments inlined below.
> 
>             Arturo
> 
>
------------------------------------------------------------------------
> 
> *From:* David Scott [mailto:david_scott@mentor.com]
> 
> Arturo:
> 
> Some reaction from the Mentor covergroup team and Gordon (Dave R and
Ray
> not represented):
> 
> #1.  Syntax.  There was a preference to drop the @, to allow a
> declaration like so:
> 
> covergroup ct function sample(int x);
> 
> The issue is that "@ function" seems like a cue to wait on an event
> related to the function, or that it seems somehow related to
event-based
> sampling.
> 
> We're open to syntactical changes.
> 
> The reason for the "@ function" syntax was to use an operator to
> separate the coverage declaration from the sampling method
declaration;
> it seems more readable this way. We'd like to hear from other people.



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Nov 13 17:16:32 2007

This archive was generated by hypermail 2.1.8 : Tue Nov 13 2007 - 17:17:52 PST