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


Subject: RE: [sv-ac] Question about reference to data defined in sequence.
From: Bassam Tabbara (bassam@novas.com)
Date: Wed Feb 05 2003 - 15:25:02 PST


Hi All,

For templates I would recommend we not use any of the following
terminology to describe the formal/actual association: argument passing,
design object binding, port connection, parameters (although this gets
the idea across, still has its baggage) ....

* I suggest we call this -substitution- more formally formal/actual
substitution. That's what's happening no "passing" (value/reference and
so on...), and not really parameter (that's better reserved for Adam's
generate type constructs...).

BTW, to respond to this thread, I see no apparent restriction on this
substitution, you can do whatever, the restriction is that once the code
is preprocessed there should not be any (semantic) errors e.g.
re-definition of sequences, putting a sequence where a boolean would go
and so on ...

-Bassam.

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

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

> -----Original Message----- > From: owner-sv-ac@server.eda.org > [mailto:owner-sv-ac@server.eda.org] On Behalf Of Adam Krolnik > Sent: Wednesday, February 05, 2003 3:08 PM > To: john.havlicek@motorola.com > Cc: Surrendra.Dudani@synopsys.com; sv-ac@server.eda.org; Adam Krolnik > Subject: Re: [sv-ac] Question about reference to data defined > in sequence. > > > > > Hi John; > > > Or how about this version which would allow the encapsulation > I desire. > > The template has as an argument a sequence (check_seq) that > will be called from within the template. When it is called, > it passes in the dynamic data reference. > > > // A user defined sequence... > sequence check_data(data) = (data == fifo_out_data); > > // A standard template for use whereever. > template tem(check_seq); > ast: assert (fifo_push => ((int itsdata = > fifo_in_data) [1:100] fifo_pop; > [0] check_seq(itsdata))) > else $error(); > endtemplate > > // Instantiate the template with the specific data checking sequence. > tem my_tem(check_data); > > > Or with more arguments: > > template tem(clk, > fifo_push, > fifo_in_data, > fifo_pop, > check_seq); > > ast: assert @(posedge clk) > (fifo_push => ((int itsdata = fifo_in_data) > [1:100] fifo_pop; > [0] check_seq(itsdata))) > else $error(); > endtemplate > > > tem my_tem(clk, fifo_push, fifo_in_data, fifo_pop, check_seq); > > So what else could be parameterized? > The maximum value in the range above? [1:100] - could it > be [1:latency] ? > The width of declared dynamic data? int itsdata - could > it be [W-1:0] itsdata? > > > Adam Krolnik > Verification Mgr. > LSI Logic Corp. > Plano TX. 75074 > > >



This archive was generated by hypermail 2b28 : Wed Feb 05 2003 - 15:26:13 PST