indexing with integer signal

Discussion in 'Programmer's Corner' started by hess@m, Oct 17, 2005.

  1. hess@m

    Thread Starter New Member

    Oct 17, 2005
    1
    0
    hi
    i have a problem with indexing my bit_vector with an integer signal.
    ------------------------------------
    entity testinteger is
    end entity;
    architecture test of testinteger is
    signal int:integer;
    signal bin1:bit_vector(5 downto 0);
    signal bin2:bit_vector(2 downto 0);
    begin
    int<=2;
    bin1<="110010";
    bin2<=bin1(int*2 downto int*2-2);
    end test;
    ------------------------------------


    if you run this little program , you get an error!!this program
    decrements "int" and i don't know why??!!it shouldn't do that.
    i don't want to declare "int" as a const.
    can anyone help me what should i do??
    hess@m..
     
  2. Brandon

    Senior Member

    Dec 14, 2004
    306
    0
    What language is that?

    What are you trying to accomplish in the end?

    What is it actually doing?

    Be as verbose as you can.
     
Loading...