[sv-ec] Re: Arguments to "randomize" method calls

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Tue Mar 07 2006 - 07:48:49 PST
Gordon Vreugdenhil wrote:

> In 1800-2005, 13.10 we have:
>    The scope of the arguments to the randomize method is the object
>    class. Arguments are limited to the names of properties of the
>    calling object; expressions are not allowed.
> 
> I just want to clarify whether the name binding is static based on
> the type of the reference or dynamic based on the actual object.
> Specifically, is the following legal:
> 
>    class A;
>    endclass
>    class B extends A;
>      rand int c;
>    endclass
>    A a;
>    B b;
>    initial begin
>       b = new;
>       a = b;
>       a.randomize(c);   // randomize member "c" - legal?
>    end
> 
> For a normal reference "a.c" is illegal but the text in 13.10
> talks about both the "object class" and the "calling object".
> At this point, I'm assuming that this example should be illegal.
> 
> BTW, there are some very nasty separate compilation issues
> involving randomize since the formals of the class method
                                 ^^^^^^^
Should be "actuals" of course.

Gord

> randomize are member names while in a hierarchical call
> to a task randomize they would be normal actuals.
> 
> Gord.

-- 
--------------------------------------------------------------------
Gordon Vreugdenhil                                503-685-0808
Model Technology (Mentor Graphics)                gordonv@model.com
Received on Tue Mar 7 07:48:52 2006

This archive was generated by hypermail 2.1.8 : Tue Mar 07 2006 - 07:49:02 PST