Locally static?!

Discussion in 'VHDL' started by Taras_96, May 2, 2005.

  1. Taras_96

    Taras_96 Guest

    Ok, can anyone tell me why:

    constant B4 : unsigned := "010";
    constant CONST : unsigned := B4 + "001"; --is NOT locally static

    constant B4 : integer := 2;
    constant CONST : integer := B4 + 1; -- is locally static

    Taras
     
    Taras_96, May 2, 2005
    #1
    1. Advertising

  2. Taras_96 wrote:
    > Ok, can anyone tell me why:
    >
    > constant B4 : unsigned := "010";
    > constant CONST : unsigned := B4 + "001"; --is NOT locally static
    >
    > constant B4 : integer := 2;
    > constant CONST : integer := B4 + 1; -- is locally static
    >
    > Taras
    >


    I seem to remember that the process of slicing a vector is considered
    non-static, so perhaps the creation of the anonymous subtype of the
    unsigned vector makes it non-static. I shall look it up in the standard
    when at work.

    In the case of the integer, there is no anonymous subtype created as no
    subtype of integer if implied.

    In the case of unsigned, the vector will deduce its width from the size
    of B4.

    regards
    Alan

    --
    Alan Fitch (at home)
    reverse: org dot ieee dot apfitch
     
    Alan Peter Fitch, May 2, 2005
    #2
    1. Advertising

  3. Taras_96

    Duane Clark Guest

    Taras_96 wrote:
    > Ok, can anyone tell me why:
    >
    > constant B4 : unsigned := "010";
    > constant CONST : unsigned := B4 + "001"; --is NOT locally static


    I think because CONST is an unconstrained array. Try
    constant CONST : unsigned(2 downto 0) := B4 + "001";
    or some such.

    >
    > constant B4 : integer := 2;
    > constant CONST : integer := B4 + 1; -- is locally static
    >
    > Taras
    >
     
    Duane Clark, May 2, 2005
    #3
  4. Taras_96

    Jim Lewis Guest

    Taras,
    > constant B4 : unsigned := "010";
    > constant CONST : unsigned := B4 + "001"; --is NOT locally static
    >
    > constant B4 : integer := 2;
    > constant CONST : integer := B4 + 1; -- is locally static



    From the LRM:
    7.4.1 Locally static primaries
    An expression is said to be locally static if and only if every
    operator in the expression denotes an implicitly deï¬ned operator
    whose operands and result are scalar and if every primary in the
    expression is a locally static primary, where a locally static
    primary is deï¬ned to be one of the following: ...

    Integers are scalar, arrays are not.


    The VHDL-200X effort has proposals that modify this.
    Two important changes:
    1) Strike the requirement for the operand and result to be scalar. (FT22)
    2) Include operators defined in std_logic_1164 and numeric_std along
    with implicitly defined operators in consideration for being
    locally static. (FT23)


    The VHDL-200X working group is looking for corporate support
    to fund the LRM editing effort. Funding will determine the
    question as to when the features will be available.
    If your company can help sponsor this effort, please contact
    myself (VASG vice-chair) or Stephen Bailey (VASG chair).


    Best Regards,
    Jim Lewis




    >
    > Taras
    >



    --
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Jim Lewis
    Director of Training mailto:
    SynthWorks Design Inc. http://www.SynthWorks.com
    1-503-590-4787

    Expert VHDL Training for Hardware Design and Verification
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    Jim Lewis, May 16, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charles M. Elias

    Why is this not a locally static choice?

    Charles M. Elias, Jun 26, 2003, in forum: VHDL
    Replies:
    2
    Views:
    1,512
    Charles M. Elias
    Jun 26, 2003
  2. jesse_j
    Replies:
    2
    Views:
    1,493
    jesse_j
    Dec 12, 2004
  3. Mohammed  A khader
    Replies:
    1
    Views:
    2,661
    Jonathan Bromley
    Jan 28, 2005
  4. Kenneth Johansson
    Replies:
    9
    Views:
    8,931
    Mike Treseler
    May 9, 2005
  5. Rick North
    Replies:
    10
    Views:
    4,152
    Rick North
    Jul 27, 2005
Loading...

Share This Page