vhdl: wrong index type

Discussion in 'VHDL' started by dancar, Sep 21, 2009.

  1. dancar

    dancar

    Joined:
    Sep 21, 2009
    Messages:
    1
    hello,
    I've the following error:
    ERROR:HDLParsers:821 ... Wrong index type for framebuf.
    here the code:
    ...
    type defbuf is array (399 downto 0) of std_logic_vector (7 downto 0);
    type small_int is range 0 to 399 ;
    ...
    process (QCLK)
    variable i : small_int:= 0;
    begin
    if (QCLK = '1' and QCLK'event) THEN
    ...
    i:=i+1;
    framebuf(i)<=PIXIN
    end if;
    ...
    end process;
    Can you help me in order to solve this problem?
    Thanks
     
    dancar, Sep 21, 2009
    #1
    1. Advertising

  2. dancar

    joris

    Joined:
    Jan 29, 2009
    Messages:
    152
    maybe
    Code:
    type small_int is natural range 0 to 399 ;
    or
    Code:
    framebuf(integer(i))<=PIXIN
    help?

    Just guessing though
     
    joris, Sep 26, 2009
    #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. eeh

    Wrong index type

    eeh, Oct 4, 2005, in forum: VHDL
    Replies:
    4
    Views:
    4,950
    Nicolas Matringe
    Oct 5, 2005
  2. afd
    Replies:
    1
    Views:
    8,417
    Colin Paul Gloster
    Mar 23, 2007
  3. ieee.sucks.all

    wrong index type for array?

    ieee.sucks.all, Jul 8, 2008, in forum: VHDL
    Replies:
    0
    Views:
    804
    ieee.sucks.all
    Jul 8, 2008
  4. Tomasz Chmielewski

    sorting index-15, index-9, index-110 "the human way"?

    Tomasz Chmielewski, Mar 4, 2008, in forum: Perl Misc
    Replies:
    4
    Views:
    321
    Tomasz Chmielewski
    Mar 4, 2008
  5. Stefan Mueller
    Replies:
    7
    Views:
    199
    Thomas 'PointedEars' Lahn
    Nov 28, 2005
Loading...

Share This Page