I'm not quite sure that I buy your example. If you have: typedef ab; .... import pkg1::ab; I can buy that as a completion of the forward, but what you are asserting is that the forward typedef is completed *upon its declaration* if the type is is a candidate from some package. That isn't an obvious conclusion from the text and is one that I am not sure I agree with. An implication of such a statement is that if ANY package has a visible type "T" then you can't forward declare "T" even if your intent was to have the declaration complete locally. I would contend that the forward declaration does NOT count as a reference and the the completion must either be via an explicitly named import or by a subsequent typedef. So typedef ab; ... typedef pkg1::ab ab; would be fine as would my earlier example, but your example would not. Gord. Brad Pierce wrote: > According to the final sentence of 4.9, > > "Importing a typedef from a package into a local scope can also > resolve a type definition." > > It would be helpful to add an example of that, such as, > > package pkg1; > typedef struct {logic a, b;} ab; > endpackage > > package pkg2; > import pkg1::*; > typedef ab; > endpackage > > module test(input a1, b1, output a2, b2); > import pkg2::*; > assign '{a2, b2} = ab'{a1, b1}; > endmodule > > -- Brad > > -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.comReceived on Thu Sep 28 14:18:19 2006
This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 14:18:35 PDT