RE: [sv-bc] DataTypes: wording for optional "var"

From: Brad Pierce (Brad.Pierce@synopsys.com)
Date: Thu Nov 18 2004 - 15:35:43 PST

  • Next message: Steven Sharp: "Re: [sv-bc] DataTypes: wording for optional "var""

    Please, I don't want to have to write

       var logic [3:0] count;

    instead of

       var [3:0] count;

    Just as I don't have to write

       wire logic [3:0] w;

    I'll be sending out a revised BNF in a few minutes to fix the
    problem Mark pointed out.

    -- Brad

    -----Original Message-----
    From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org]On Behalf Of
    Warmke, Doug
    Sent: Thursday, November 18, 2004 3:15 PM
    To: Kathy McKinley; btf-dtype@boyd.com; sv-bc@eda.org
    Subject: RE: [sv-bc] DataTypes: wording for optional "var"

    Hi Kathy,

    I think it's a good time to introduce "var".

    I only have one issue with this proposal:
    What is the point of allowing an "optional" data type after var?
    There are no backward compatability issues to deal with.
    If there is no good reason for this optionality, I would prefer
    that the LRM mandate the use of a data type after the var keyword.

    Regards,
    Doug

    > -----Original Message-----
    > From: owner-btf@boyd.com [mailto:owner-btf@boyd.com] On
    > Behalf Of Kathy McKinley
    > Sent: Thursday, November 18, 2004 3:00 PM
    > To: btf-dtype@boyd.com; sv-bc@eda.org
    > Subject: [sv-bc] DataTypes: wording for optional "var"
    >
    > I have appended some proposed wording for an optional "var" keyword
    > in a variable declaration. Please send your feedback as soon
    > as possible.
    > Even if you think the wording is fine, can you please send mail
    > indicating this?
    >
    > Thanks,
    >
    > Kathy
    >
    > SECTION 5.4. Variables:
    >
    > CHANGE:
    >
    > A variable declaration consists of a data type followed by one
    > or more instances.
    >
    > shortint s1, s2[0:9];
    >
    > TO:
    >
    > One form of variable declaration consists of a data type
    > followed by one
    > or more instances.
    >
    > shortint s1, s2[0:9];
    >
    > Another form of variable declaration begins with the keyword "var".
    > The data type is optional in this case. If a data type is not
    > specified then the data type logic shall be inferred.
    >
    > var byte my_byte; // equivalent to "byte my_byte;"
    >
    > var v; // equivalent to "var logic v;"
    >
    > var enum bit { clear, error } status;
    >
    > input var logic data_in;
    >
    >



    This archive was generated by hypermail 2.1.4 : Thu Nov 18 2004 - 15:22:18 PST and
    sponsored by Boyd Technology, Inc.