RE: [sv-ac] call to vote on 1698

From: Korchemny, Dmitry <dmitry.korchemny_at_.....>
Date: Sun Feb 17 2008 - 08:48:39 PST
Hi Jonathan,

Yes, in your example the assertion will have 8 identical executions (if
it does not depend on the loop control variable), but IMO opinion this
behavior is correct, and may be made rather efficient.

If the user writes such an assertion, that it is likely a bug and the
simulation tool may warn about it in some cases, and/or to make
optimizations by evaluating the assertion fewer times than inferred.
E.g.,

for (int i = 0; i < 3; i++) begin
	for (int j = 0; j < 4; j++) begin
	a: assert property (@clk x[j]);
	end
end

the following assertion is sufficient to check only 4 times and not 12
times.

The optimization will be prevented if there is an action block with a
side-effect (e.g., when the action block counts the total number of
successful attempts). It is unlikely that such action blocks are
specified in assertions, but they may be specified for cover property
statements. In the latter case the replicating of the assertion is
justified, since if a cover statement is placed in the loop then the
intention should be to count the cover point at each loop iteration.

I think that placing concurrent assertions within a procedural code may
be quite useful to preserve locality, and I know many users who were
concerned that there was impossible to place concurrent assertions in
procedural for loops. Here is a toy example:

always @(posedge clk) begin
	for (int i = 0; i < 3; i++) begin
		x[i] <= !x[i];
		assert property(##1 !$stable(x[i]));
	end
end

Thanks,
Dmitry

-----Original Message-----
From: owner-sv-ac@server.eda.org [mailto:owner-sv-ac@server.eda.org] On
Behalf Of Jonathan Bromley
Sent: Sunday, February 17, 2008 11:45 AM
To: Bresticker, Shalom
Cc: sv-ac@server.eda.org
Subject: RE: [sv-ac] call to vote on 1698

Shalom,

> Regarding the loop, I think that Mantis 1995 specifies that the
> assertion will be evaluated once for each iteration of the loop.

Ah, sorry, as usual I am a few months behind the latest
developments :-)

So that means my assertion would have _eight_ executions,
all behaving identically in the way I suggested, since my
assertion does not depend on the loop variable.  Inefficient,
and misleading for coverage, but otherwise harmless.

I would nevertheless like to ask the original question - 
whether it would be OK to infer a clock based on the flow
of procedural execution through the "assert property".

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

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.


---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Sun Feb 17 08:49:03 2008

This archive was generated by hypermail 2.1.8 : Sun Feb 17 2008 - 08:49:34 PST