Re: [sv-ec] covergroup query

From: Arturo Salz <Arturo.Salz@synopsys.com>
Date: Fri Feb 04 2005 - 17:23:33 PST

Ray, Swapnajit,

You are correct that the way it is written, the statement does not necessarily
preclude using both mechanisms simultaneously. My response addressed
only the intent, which was to have only one of the two mechanisms active at
the same time. There are no technical issues that justify disallowing the
sample method on an event-triggered covergroup, except that it is probably
not that useful. In particular, the sample method can be used to handle both
forms by making the method sensitive to the event, for example:

    covergroup cg1 ... endgroup

    cg = new;
    always @(posedge clk) cg.sample();

    initial begin ... cg.sample() ... end

Is basically the same as:

    covergroup cg2 @(posedge clk) ... endgroup

    cg = new;

    initial begin ... cg.sample() ... end
    
So I have no problem if we leave this as is.

I believe we all agree on the second issue: the sample method must
be applied to a covergroup instance. Should we submit an errata to
update the table? It's certainly a minor correction.
    Arturo

----- Original Message -----
From: Ryan, Ray
To: Arturo Salz ; Swapnajit Chakraborti ; sv-ec@eda.org
Sent: Friday, February 04, 2005 10:31 AM
Subject: RE: [sv-ec] covergroup query

Arturo, Swapnajit

I don't believe the statement

    "If the clocking event is omitted, users must procedurally trigger the coverage
     sampling. This is done via the built-in sample() method (see Section 20.7)."

precludes calling the sample() method when a clocking event is ommited. It only
states that if the clocking event is omitted, then the sampling must be done
procedurally. The clocking event simply specifies an implicit call of the sample()
method. Each time it is called, the coverage is updated. If it is never called,
coverage is never updated.

I agree with Arturo that the sample() method must applied to an instance of
a covergroup. That is, it is not a 'static' method of the covergroup type.

- Ray

------------------------------------------------------------------------------
  From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Arturo Salz
  Sent: Friday, February 04, 2005 10:00 AM
  To: Swapnajit Chakraborti; sv-ec@eda.org
  Subject: Re: [sv-ec] covergroup query

  Swapnajit,

  The sample() method can not be applied to a covergroup, but to an
  instance of a covergroup. I agree that Table 20-5 should specify a
  covergroup instance.

  Calling the sample() method on a covergroup the includes a clocking
  event is not allowed. Section 2.2 disallows that:

      "If the clocking event is omitted, users must procedurally trigger the coverage
       sampling. This is done via the built-in sample() method (see Section 20.7)."

    Arturo

  ----- Original Message -----
  From: "Swapnajit Chakraborti" <swapnaj@cadence.com>
  To: <sv-ec@eda.org>
  Cc: "swapnaj" <swapnaj@gazal.cadence.com>
  Sent: Friday, February 04, 2005 1:22 AM
  Subject: [sv-ec] covergroup query

  This query pertains to covergroup in Section 20 (Coverage) of LRM.

  - According to LRM, sample() method can be called on a covergroup.
    Refer Table 20.5. Does it mean that calling this method for
    a covergroup will enable sampling for all its instances? Now,
    covergroup declaration as such has no effect till it is instantiated
    through new(). So, shouldn't sample() method be used for an instance
    of a covergroup rather than covergroup declaration?

  - LRM does not mention the behavior when user specifies
    clocking event in covergroup declaration and also activates/samples
    procedurally through sample() method. I believe both of them shouldn't
  be
    allowed simultaneously.

  Any thoughts on the above?

  Swapnajit.
Received on Fri Feb 4 17:23:42 2005

This archive was generated by hypermail 2.1.8 : Fri Feb 04 2005 - 17:24:28 PST