Hi Benm
Rand variables are never sampled (well, according to 3213, they are
"sampled", but the "sampled value" of a rand checker variable is the
current value).
Nothing changes otherwise
Tom
On 06/06/11 19:11, ben cohen wrote:
> Tom,
> One more question; For the new proposal, what if x, y were
> *rand* variables, is below correct on sampling and updates?
>
> checker check(bit a, b, event clk, ...);
> * rand bit x, y, z, v;*
>
> always_comb
> y = a & b; // legal, changed in the Reactive Region?
> always_ff @clk
> // x sampled in the preponed region.
> // z updated in the Re-NBA region
> z <= !x; //
> endchecker : check
>
> module m;
> logic clk=0, a, b;
> initial forever #10 clk=!clk;
> check chk1(a, b, posedge clk);
> ...
> endmodule : m
>
> On Mon, Jun 6, 2011 at 3:28 PM, Thomas J Thatcher
> <thomas.thatcher@oracle.com <mailto:thomas.thatcher@oracle.com>> wrote:
>
> Hi Ben,
>
> For IEEE 1800-2009, continuous assignments are not allowed in checkers.
> So the assignment to x would not be legal, and it was not defined
> when x would be sampled. Dmitry's proposal (3033) would allow
> continuous assignments within checker, and they would update in the
> Reactive region. So the assignment to x would take place in the
> Reactive region.
>
> Non-blocking procedural assignments are currently updated in the
> Re-NBA region. This does not change. Previously, in 1800-2009
> non-blocking assignments could only reference checker inputs or
> other checker variables assigned by non-blocking assignments. The
> non-blocking assignments would see the sampled value of any checker
> inputs, because all checker inputs were sampled, and it would see
> the current value of any other checker variable. Dmitry's proposal
> would change things so that checker inputs are not automatically
> sampled. However, any variable referenced by the RHS of a
> non-blocking assignments would be sampled.
>
>
> So if Dmitry's proposal is enacted,
> 1. x & y updated in the Reactive region
> 2. z updated in the Re-NBA region, x sampled in the preponed region.
>
> Tom
>
>
>
> On 06/05/11 23:28, ben cohen wrote:
>
> Questions: or model shown below: 1) When is "x" sampled? Active
> Region 2) In what region is "z" changed? In the Reactive?
> 3) are my comments correct?
> checker check(bit a, b, event clk, ...);
> bit x, y, z, v;
> assign x = a & b; // legal, changed in the Reactive Region?
> always_comb
> y = a & b; // legal, changed in the Reactive Region?
> always_ff @clk
> z <= !x; // , x sampled in active region? z changed in Reactive?
> endchecker : check
>
> module m; logic clk=0, a, b;
> initial forever #10 clk=!clk;
> check chk1(a, b, posedge clk); ... endmodule : m Ben
> --
> 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* <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 Jun 7 08:30:16 2011
This archive was generated by hypermail 2.1.8 : Tue Jun 07 2011 - 08:30:20 PDT