RE: [sv-ac] do action blocks use sampled values

From: Seligman, Erik <erik.seligman_at_.....>
Date: Tue Oct 07 2008 - 08:42:47 PDT
Thanks-- I have added this note to Mantis 2398.

________________________________
From: owner-sv-sc@server.eda.org [mailto:owner-sv-sc@server.eda.org] On Behalf Of Korchemny, Dmitry
Sent: Monday, October 06, 2008 11:21 PM
To: Kulshrestha, Manisha; sv-ac@server.eda.org
Cc: sv-sc@eda.org
Subject: [sv-sc] RE: [sv-ac] do action blocks use sampled values

Hi Manisha,

This is apparently wrong. It may be fixed either as:

$error("a8 failed for const i=%d and i=%d", const'(i), $sampled(i));;

(BTW, note an extra ';' here).

or as "since 10 will be the sampled value captured from the Reactive region." I would prefer the first correction since it reflects the intention of this fragment.

Hopefully this may be fixed as an editorial issue.

Note that this issue belongs to SV-SC, and not to SV-AC.

Dmitry


From: owner-sv-ac@server.eda.org [mailto:owner-sv-ac@server.eda.org] On Behalf Of Kulshrestha, Manisha
Sent: Tuesday, October 07, 2008 6:55 AM
To: sv-ac@server.eda.org
Subject: [sv-ac] do action blocks use sampled values

Hi,

I am just wondering if action blocks use sampled values or current values. I thought they use the current values from the reactive region (unless user specifically uses sampled value function in there). But here is an example in the new LRM which says that they use sampled value.

Page 407  (Sec 16.15.6.1)
// Assume for this example that (posedge clk) will not occur at time 0
always @(posedge clk) begin
int i = 10;
for (i=0; i<10; i++) begin
a8: assert property (foo[const'(i)] && bar[i]) else
$error("a8 failed for const i=%d and i=%d", const'(i), i);;
end
end
Upon a failure, any instance of the above assertion will show the constant value of i (may be from 0 to 9)
that was used in that instance for "const i=", while the string printed will always end in "i=10", since 10
will be the sampled value captured from the Preponed region.

Is it right that action blocks use sampled values ? If yes, then which values are sampled in case action block contains a set of stetements including assignments etc ?

Thanks.
Manisha

--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, 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<http://www.mailscanner.info/>, 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 Tue Oct 7 09:07:33 2008

This archive was generated by hypermail 2.1.8 : Tue Oct 07 2008 - 09:08:43 PDT