Re: [sv-bc] Assignment compatibility after elaboration

From: Greg Jaxon <Greg.Jaxon_at_.....>
Date: Thu Sep 06 2007 - 10:01:34 PDT
Bresticker, Shalom wrote:

> I was thinking of this example from Surya:
> 
> module bottom;
>    parameter type pt = int;
>    pt x;
> endmodule
> 
> module top;
>    typedef struct {int x; int y;} et;
>    bottom #(et) b1();
>    bottom #(et) b2();
>    initial begin
>       b1.x = b2.x;
>    end
> endmodule

OK.  Just keep that line of thought going...

module middle;
  typedef struct {int x; int y;} et;
  bottom #(et) mb();
endmodule

module top;
  middle m[2]();
  initial begin
     m[0].mb.x = m[1].mb.x;
  end
endmodule

Once again, the hierarchical name resolutions make this unsynthesizable.
But with a bit more malice, it's not hard to make a synthesizable testcase.

Homogeneous arrays of instances are an obvious way to form DAGs
whose nodes are module specializations.  By removing instance-specificity
from the definition of the struct{int x; int y;}, the two instances
of bottom share the same module specialization.  Their ability to
cooperate is increased.

Greg


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Sep 7 18:54:54 2007

This archive was generated by hypermail 2.1.8 : Fri Sep 07 2007 - 18:55:21 PDT