Arturo:
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.
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.)
int a;#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:
covergroup ct (ref int b) function sample(int c);
coverpoint a + b + c;
endgroup
int 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);
coverpoint a;
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).
covergroup ct (ref int a) function sample(ref int x = a);Can they be non-static class properties for an embedded covergroup?
function int f(output o, input i);Finally, what about a null argument list to sample? That sounds to me like it should be disallowed.
o = 2*i;
return o;
endfunction
covergroup ct function sample(output o, input i);
coverpoint f(o,i);
endgroup
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 archive was generated by hypermail 2.1.8 : Fri Nov 09 2007 - 14:28:03 PST