[sv-ac] do action blocks use sampled values

From: Kulshrestha, Manisha <Manisha_Kulshrestha_at_.....>
Date: Mon Oct 06 2008 - 21:54:54 PDT
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, and is
believed to be clean.
Received on Mon Oct 6 21:55:59 2008

This archive was generated by hypermail 2.1.8 : Mon Oct 06 2008 - 21:56:52 PDT