RE: Issue with Generate

From: Kausik Datta (kausikd@cal.interrasystems.com)
Date: Fri Feb 25 2005 - 07:20:58 PST

  • Next message: Steven Sharp: "RE: Issue with Generate"

    Hi Paul,
    No. In 1364-2001 LRM generate doesn't define any scope.
    I think in latest draft 3 or 4 some scope is defined like that.
    But the issue is not with defparam.
    Issue is with the line

            if ( I1.p == 1 )

    Even if you remove the defparam line none of the simulator will be able to
    elaborate this design.

    Thanks
    Kausik

    -----Original Message-----
    From: Paul Graham [mailto:pgraham@cadence.com]
    Sent: Friday, February 25, 2005 8:32 PM
    To: kausikd@cal.interrasystems.com
    Cc: btf@boyd.com
    Subject: Re: Issue with Generate

    Doesn't a generate create a separate scope? In that case:

        module top;
          defparam I1.p = 1;
          generate
            if ( I1.p == 1 )
              M2 I1();
            else
              M3 I1();
            endgenerate
        endmodule

    the defparam's reference to instance I1 can't be resolved in the
    module-level scope, and so the defparam is invalid.

    Paul



    This archive was generated by hypermail 2.1.4 : Fri Feb 25 2005 - 07:01:40 PST and
    sponsored by Boyd Technology, Inc.