RE: [sv-bc] FW: [sv-ec] Question on compilation units & compiler directives

From: Rich, Dave <Dave_Rich_at_.....>
Date: Wed Jan 25 2006 - 08:07:41 PST
Do we really want to get into type matching by structural layout, I
don't think so.

But its get's even more complicated with generate statements.

module foo;
  parameter W=4;
  generate if (W <4)
    class bar;
      int A[W];
    endclass
  else
    class bar;
      string B[W];
    endclass     
 endgenerate
  bar B=new;
endmodule

> -----Original Message-----
> From: Paul Graham [mailto:pgraham@cadence.com]
> Sent: Wednesday, January 25, 2006 7:53 AM
> To: Rich, Dave
> Subject: Re: [sv-bc] FW: [sv-ec] Question on compilation units &
compiler
> directives
> 
> > initial f1.B.A = f2.B.A; // Not legal
> 
> Couldn't this be resolved by resort to structural
> equivalence?  In this case the two classes have
> different sizes, due to the different parameter values.
> But if you had:
> 
>     foo #(3) f1();
>     foo #(3) f2();
> 
>     initial f1.B.A = f2.B.A;
> 
> then the two A vectors would have the same size.  Yet
> you're saying this assignment is illegal?
> 
> Paul
Received on Wed Jan 25 08:08:29 2006

This archive was generated by hypermail 2.1.8 : Wed Jan 25 2006 - 08:08:35 PST