[sv-ac] RE: [sv-ec] RE: covergroup sample method

From: Arturo Salz <Arturo.Salz_at_.....>
Date: Wed Oct 17 2007 - 23:53:44 PDT
Jonathan,

I believe that the scheme you suggest will certainly work, but it does
require a fair amount of boiler-plate code to get it working. The
request is to provide a built-in shortcut to provide the same
functionality without having to define auxiliary classes, instantiate
auxiliary objects, wrap a function around the class sampling, etc... It
is an enhancement for sure, but I find it to be a reasonable request.

	Arturo

-----Original Message-----
From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of
Jonathan Bromley
Sent: Wednesday, October 17, 2007 12:15 PM
To: john.havlicek@freescale.com
Cc: sv-ac@eda.org; sv-ec@eda.org
Subject: [sv-ec] RE: covergroup sample method

> I would like to find a better way of moving data from assertions to
> covergroups.
[...]
> In general, multiple evaluation attempts or sub-attempts of the 
> assertion may want to post in the same timestep.  The order in 
> which they post is non-deterministic, but all the posts should get
> into the covergroup instance.  In general, there is no bound on 
> the number of posts in a timestep.
[...]
> Does the class wrapper method you are suggesting accommodate such
> usage?

Absolutely.  The assertion invokes a method of the wrapper class,
with its accumulated "interesting" values as arguments.  The
method copies those values to class data members using
blocking assignment in the ordinary way, and then calls the
covergroup's sample() method.  None of this consumes any 
simulation time, and none of it blocks.  

If you are really worried that pre-emptive scheduling might 
make this nondeterministic, you could protect the class method 
with some kind of mutex such as a semaphore.
 
> Even if it does, I guess that I am looking for something cleaner.

I don't really see what's "not clean" about it.  Instantiating 
and sampling the wrapper class is no more onerous and no more
verbose than doing those things for the covergroup itself, since
the wrapper class looks after the care and feeding of the 
covergroup.  (Side-issue: can covergroup instances be "local"
(private)?  I would probably wish them to be, in this usage.)
-- 
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

The contents of 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.



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Oct 17 23:54:22 2007

This archive was generated by hypermail 2.1.8 : Wed Oct 17 2007 - 23:55:02 PDT