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

From: David Scott <david_scott_at_.....>
Date: Fri Nov 09 2007 - 14:26:55 PST
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.

#2.  We'd prefer some re-wording around the first sentence of the last paragraph.  Maybe something like this:
Within coverpoint and guard expressions, the formal arguments of an overridden sample method shall be searched after other covergroup items but before the scope enclosing the covergroup.
("Other covergroup items" might be the option or type_option members, though not coverpoints and crosses according to Mantis 1279.)

#3.  "error to use a sample argument" should read "error to use a sample formal".

#4.  The last example needs a "ref" added in the covergroup arguments, like so: "covergroup C1 (ref int v)".

#5.  Just for people to consider, we are expecting the following to be legal (with our preferred syntax)?
int a;
covergroup ct (ref int b) function sample(int c);
    coverpoint a + b + c;
endgroup
#6.  A host of issues around sample arguments.  One thing that occurred to us -- without, I'll note, Gordon's blessing! -- is that we could possibly allow this:
int a;
covergroup ct function sample(ref int x = a);
    coverpoint a;
This would allow event-based sampling to occur as well as procedural sampling, let's say with this syntax (which I know would be a change from the proposal):
covergroup ct function sample(ref int x = a) @(e);
With event-based sampling, the default arguments would be used, which as you see cause "a" from the enclosing scope to be sampled.  It wasn't clear from Mike's original e-mail whether the override was expected to be optional (used occasionally) or required (used always).

If default arguments are used, what restrictions are there?  Can they be covergroup formals, like this?
covergroup ct (ref int a) function sample(ref int x = a);
Can they be non-static class properties for an embedded covergroup?

What about "output" arguments?  While this sounds nonsensical, someone might find a use for something like this:
function int f(output o, input i);
    o = 2*i;
    return o;
endfunction

covergroup ct function sample(output o, input i);
    coverpoint f(o,i);
endgroup
Finally, what about a null argument list to sample?  That sounds to me like it should be disallowed.


-- David Scott, Mentor Graphics


Arturo Salz wrote:
I've uploaded a proposal for Mantis 2149. Please review.

	Arturo

-----Original Message-----
From: owner-sv-ec@eda.org On Behalf Of Michael Burns
Sent: Wednesday, October 24, 2007 4:38 PM
To: SV_EC List
Cc: John Havlicek
Subject: [sv-ec] Mantis 2149 - Covergroups sample method with arguments


Mantis 2149 - Covergroups sample method with arguments has been
submitted 
describing what we'd like to see in a solution for the covergroup sample
issue I 
raised a week or two ago.

--Mike Burns


  


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean. Received on Fri Nov 9 14:27:17 2007

This archive was generated by hypermail 2.1.8 : Fri Nov 09 2007 - 14:28:03 PST