Problem with integer a vector range

Discussion in 'VHDL' started by nicx82, Feb 11, 2010.

  1. nicx82

    nicx82

    Joined:
    Nov 5, 2008
    Messages:
    9
    My code:

    Integer is an Integer Variable
    OutputNumber is an Std_logic_Vector Input


    Integer <= conv_integer(OutputNumber);
    MyVector(37 downto (38-Integer)) <= Temp(37 downto (38-Integer));

    Compiler Error:
    Error (10454): VHDL syntax error: right bound of range must be a constant


    PLEASE HELP ME.
     
    Last edited: Feb 11, 2010
    nicx82, Feb 11, 2010
    #1
    1. Advertising

  2. nicx82

    sridar

    Joined:
    Jun 5, 2007
    Messages:
    51
    I think, it is not possible to code like this way. Dynamic bus assignment while hardware is running doesn't seems to be a right way.

    Since you are assigning the values base on user input,you are getting this error message and also if your integer value is zero, myvector value becomes (37 downto 38) which can't be done.

    Re-think your logic keeping programing for hardware in mind.

    If the integer value is constant or generic, this can be done.

     
    sridar, Feb 12, 2010
    #2
    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. pmatos
    Replies:
    6
    Views:
    24,022
  2. the.real.doctor.zoidberg@gmail.com

    Problems instantiating a Vector<Vector<Integer>>

    the.real.doctor.zoidberg@gmail.com, Nov 1, 2006, in forum: Java
    Replies:
    2
    Views:
    905
  3. Allerdyce.John@gmail.com
    Replies:
    8
    Views:
    1,984
    Csaba
    Feb 18, 2006
  4. Javier
    Replies:
    2
    Views:
    601
    James Kanze
    Sep 4, 2007
  5. Rushikesh Joshi
    Replies:
    0
    Views:
    386
    Rushikesh Joshi
    Jul 10, 2004
Loading...

Share This Page