Re: [sv-ac] Question about reference to data defined in sequence.


Subject: Re: [sv-ac] Question about reference to data defined in sequence.
From: dudani@us04.synopsys.com
Date: Wed Feb 05 2003 - 12:48:19 PST


Hi Adam,
Please see the comments.
Surrendra
At 01:52 PM 2/5/2003 -0600, you wrote:

>Good afternoon;
>
>
>
>
>This is an example about the question Erich raised in the previous meeting...
>
>
>// Define sequence to compare data out of fifo with captured data from
>assertion.
>// Can I do this?
>sequence check_data = (tem.ast.itsdata == fifo_out_data);
>
>// Template to check
>template tem(check_seq);
> ast: assert (fifo_push => ((int itsdata = fifo_in_data) [1:100] fifo_pop;
> [0] check_seq))
> else $error();
>endtemplate
>
>I want to reference the dynamic 'itsdata' for use in my sequence I pass into
>the template.

Since dynamic variables are created per attempt, the existence of the
variable is meaning only to that attempt. In some situations it may be
useful to access the dynamic variables outside the scope in which it is
defined. However, accessing outside the scope creates problems such as:
1) Ambiguity in identifying attempt with the value
2) Variable may not exist at the time of reference
3) Multiple copies of the variable may exist with the same name even for
the same attempt, e.g. when used in repetition
4) Debugging can be extremely difficult

 From my experience, most problems related to dynamic creation can be
solved in combination with the current proposal and some modeling in System
Verilog

>Also, would there be a way to create dynamic data that can be referenced on
>the rhs of an implication? E.g.
>
> (a; ((int got_data = data) [1:5] b); [1:6 c)
> => ([1:10] done; [0] done_data == got_data);
>
>

In the above implication case, you will need to model as below:
(a => ((int got_data = data) (true;[1:5] b ; [1:6] c) =>
          (true ;[1:10] done; [0] (done_data == got_data)));

> Thanks.
>
> Adam Krolnik
> Verification Mgr.
> LSI Logic Corp.

**********************************************
Surrendra A. Dudani
Synopsys, Inc.
377 Simarano Drive
Suite 300
Marlboro, MA 01752

Tel: 508-263-8072
Fax: 508-263-8123
email: dudani@synopsys.com
**********************************************



This archive was generated by hypermail 2b28 : Wed Feb 05 2003 - 12:48:51 PST