Issue: Scope Rules (IEEE P1364-2005/D2, 5/26/03)

From: Bineet SRIVASTAVA (bineet.srivastava@st.com)
Date: Tue Jan 18 2005 - 02:38:23 PST

  • Next message: Shalom Bresticker: "Re: Issue: Scope Rules (IEEE P1364-2005/D2, 5/26/03)"

    In section : 12.6 for Scope rules (IEEE P1364-2005/D2, 5/26/03)

    "If an identifier is referenced directly (without a hierarchical path) within a task, function, or named block, it
    shall be declared either locally within the task, function, or named block, or within a module, task or named
    block that is higher in the same branch of the name tree that contains the task, function, or named block. If it
    is declared locally, then the local item shall be used; if not, the search shall continue upward until an item by
    that name is found or until a module boundary is encountered."

    example:

    module foo(a,b);
    input a;
    output b;

    function bar;
    input in;
    reg bar;

    bar = in;
    endfunction

    assign b = bar(a);

    endmodule

    For the above example :
    Synplify - Error (for no assignment to function)
    VCS - Warning (Ignoring second declaration)
    Formality - Error (Redeclaration of 'bar')

    Does that mean any ambiguity in scope rules section.

    Any thoughts??

    Regards
    Bineet Srivastava
    ST Microlectronics Ltd.
    NOIDA, INDIA



    This archive was generated by hypermail 2.1.4 : Tue Jan 18 2005 - 02:22:31 PST and
    sponsored by Boyd Technology, Inc.