Re: [sv-ac] AC 196:

From: John Havlicek <john.havlicek@freescale.com>
Date: Wed Nov 17 2004 - 19:01:50 PST

Adam:

I sent a mail before reading yours trying to explain that
passing by value to a sequence or property should be
equivalent to assigning to a local variable in the
sequence or property declaration.

This is exactly how we defined the semantics of pass-by-value
in the ECBV proposal to Accellera in 2002. In ECBV, however,
pass-by-reference was the default. Pass-by-value required
a modifier.

In the current context, I think that pass-by-value to
sequences and properties is a useful abbreviation, but I also
think that having the default passing mechanism be
by value, rather than be reference, is not so nice.
I appreciate your comments about building "gotcha"s into
the language.

Do you think that the inconvenience of specifying reference
arguments explicitly outweighs the convenience of being
able to have value arguments?

Best regards,

John H.

> X-Authentication-Warning: server.eda.org: majordom set sender to owner-sv-ac@eda.org using -f
> Date: Wed, 17 Nov 2004 10:09:35 -0600
> From: Adam Krolnik<krolnik@lsil.com>
> X-Accept-Language: en-us, en
> Cc: <sv-ac@eda.org>
> X-Scanned-By: MIMEDefang 2.39
> X-Virus-Status: Clean
> X-Virus-Status: Clean
> Sender: owner-sv-ac@eda.org
>
>
>
> HI Hillel;
>
>
> >Your examples are correct.
> (Re-showing the examples)
>
> SV-AC - these are equivalent in this proposal ... not the other way around !!
>
> property rule6_with_no_type(x, y);
> ##1 x |-> ##[2:10] y;
> endproperty
>
> property rule6_with_type(ref bit x, ref bit y);
> ##1 x |-> ##[2:10] y;
> endproperty
>
>
> >I prefer the form of a task because you have a definition of 'pass by value' and 'pass
> >by reference'. I believe that both of these are needed.
>
> It would be good to provide justification, with examples, why both forms are necessary.
> I believe that through the use of local variables one could obtain
> the effect of pass by value only. E.g.
>
> reg val1, val2;
>
> ... (val1 = parameter_a, val2 = parameter_b, property_rule6(val1, val2)) ...
>
> By capturing a value in a local parameter, we call the property and give it the
> stored values.
>
> I see users being confused and asking why 'ref' must be specified for all parameters.
> Consider the user error of forgetting 'ref' and the user's confusion with his assertion
> failing to detect errors because it only has the values from one point in time. This
> feature is definitely at the level of *gotcha*, though it may be more powerful for
> expert users in other ways. We need to take care that assertions don't become too
> complex to easily use.
>
> As a counter idea, I believe that through the use of local variables one could obtain
> the effect of pass by value only. E.g.
>
>
> If the pass by value capability remains, it will be necessary to explain that the
> sequence/property model is that of a task call, not a module instantiation. Note that
> the original proposed model by Synopsys was to inline assertions - a replacement of the
> formal arguments with the actual arguments passed. There was no though of pass by value
> or reference.
>
> Lastly, this change of intellectual model does not match the existing models of OVA, OVL
> and proprietary tools present in many leading organizations.
>
> Thanks.
>
> Adam Krolnik
> Verification Mgr.
> LSI Logic Corp.
> Plano TX. 75074
> Co-author "Assertion-Based Design"
>
>
>
>
>
Received on Wed Nov 17 19:02:02 2004

This archive was generated by hypermail 2.1.8 : Wed Nov 17 2004 - 19:02:16 PST