RE: Issue with Generate

From: Steven Sharp (sharp@cadence.com)
Date: Fri Feb 25 2005 - 12:30:59 PST

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

    >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.

    That change is intended to be regarded as an erratum, so generate
    constructs should define a scope in 1364-2001. But as you say,
    the issue is not with the defparam. The example could be modified
    to get around that issue, by naming the scope and adding it to
    the hierarchical name in the 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.

    And they are correct. The condition of a conditional generate must
    be a constant expression. Hierarchical references are not legal in
    constant expressions. Therefore, this is illegal by the existing LRM.
    I was unable to find a place in the LRM text that made clear that
    hierarchical references are not legal in constant expressions, but you
    can track it down through the BNF.

    The kind of circular dependency that appears in this example is part if
    why hierarchical references are not legal in constant expressions.

    Steven Sharp
    sharp@cadence.com



    This archive was generated by hypermail 2.1.4 : Fri Feb 25 2005 - 12:11:44 PST and
    sponsored by Boyd Technology, Inc.