[sv-ec] Transition coverage and covergroup instances

From: <jonathan.bromley_at_.....>
Date: Fri Aug 08 2008 - 14:15:56 PDT
hi EC,

I know it's too late to change anything now, but this question arose
in discussion here recently and I can't find clarification of it in any
version of the LRM so it might be worth asking.

How are transition coverpoints incremented when multiple
instances of a covergroup exist?  It seems reasonable to
assume that, if the covergroup's per_instance option is true,
each CG instance detects transitions as seen by just that
one instance alone.  But what happens when the CG's
per-instance option is false? 

For example:

module User;

  class Data;
    bit b;
    covergroup cg;
      coverpoint b { bins rise =  (0 => 1); }
    endgroup
    function new(bit B);
      b = B;
      cg = new;
    endfunction
  endclass

  initial begin
      Data d;
      d = new(0);
      d.cg.sample();
      d = new(1);
      d.cg.sample();
  end

endmodule 

At the end of this code we have created one instance of
the covergroup that sampled b==0, and then a second 
instance that sampled b==1.  Given that it is not a per-instance
covergroup, did we increment the "rise" bin?

It may be that the answer to this is so blindingly 
obvious to coverage experts that it isn't worth saying,
but it would be nice if the LRM were explicit about it.
Or have I missed something?

Thanks
-- 
Jonathan Bromley
Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, 
UK
Tel: +44 (0)1425 471223                   Email: 
jonathan.bromley@doulos.com
Fax: +44 (0)1425 471573                           Web: 
http://www.doulos.com

This message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Aug 8 14:17:18 2008

This archive was generated by hypermail 2.1.8 : Fri Aug 08 2008 - 14:18:02 PDT