[sv-ac] 11.8 Manipulating Data in a Sequence


Subject: [sv-ac] 11.8 Manipulating Data in a Sequence
From: Bassam Tabbara (bassam@novas.com)
Date: Thu Feb 13 2003 - 11:48:40 PST


Hi All,

Thanks Steve ... here is what I was saying earlier on the phone for 11.8
"Sampling" data in a sequence:
 
The objective here as I understand is to allow access to "sampled" data
(i.e. data a segment is operating on at a specific point in time). The
current suggestion is to use a so-called "(dynamic) variable" to store the
sample at a specific point (in time). I suspect the intent is to create a
handle (a named handle) as it were to get to that sample, the so-called
variable is only that: a named handle to access a (unknown except
dynamically) point in time, it is not really a variable a.k.a. a storage
element that can be written to any time.

seq e_two_pipes =

( (valid_in) => ((int x = pipe_in) // Attempt "picks up" pipe_in and stashes
it at this

                                   //point with every attempt

([5] ( pipe_out1 == (x+1));

(pipe_out1==pipe_cont)=>

((int y = x+1) // Access the stashed "x" (with every
attempt)

([3](pipe_out2==(y+pipe_val)))))));

 
The concept is correct, it just seems the way its implemented cannot "grow"
to be used in other places potentially, so I suggest an alternative
construct to simplify/empower .... if you can look at this in color...
seq e_two_pipes =

( { (valid_in) => ((pipe_in == pipe_in) // -cheat- to make this clear for
now ...

([5] ( pipe_out1 == (x+1));

(pipe_out1==pipe_cont) } => // call: { .....} W1 (for window 1)

((int y = W1.pipe_in +1) // W1.pipe_in means
W1.get_sampled(pipe_in)

([3](pipe_out2==(y+pipe_val)))))));

So this really looks like (enforcing that sub-sequences be named (correct me
if I am taking this too far now):
seq e_two_pipes =

( W1 => // W1 here (need to explain instantiation of named sequence
here...) is an attempt

([3](pipe_out2==(W1.pipe_in +pipe_val))))))); // Access sampled value for
the W1 attempt I // live in

BTW, I can sample in any sub sequence, the thing is I have to create a
-name- there and sample at the start of that -named instance-. make sense ?

The last extension that seems to make sense is that since pipe_in is NOT
USED in W1 may be I cannot sample it ? (of course this is my feeling,
theoretically you can sample anything, just a point in time ... but
restricting seems to have its virtues ):-)!! so I can only access things
like W1.pipe_out. This is not something already in the section, anything can
be sampled it seems.

Again I don't think this is doing anything different except is seems: a)
cleaner, b) more compatible with "clocking"/sampling constructs in SV
testbench (?), c) It can be used in many other places ..... (e.g. same place
you use ended, except there you get the value for the latest attempt sample
of course).

Thx.
-Bassam.

--
Dr. Bassam Tabbara
Technical Manager, R&D
Novas Software, Inc.

http://www.novas.com <http://www.novas.com/> (408) 467-7893




This archive was generated by hypermail 2b28 : Thu Feb 13 2003 - 11:49:20 PST