vhdl: wrong index type

Joined
Sep 21, 2009
Messages
1
Reaction score
0
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
 
Joined
Jan 29, 2009
Messages
152
Reaction score
0
maybe
Code:
type small_int is natural range 0 to 399 ;
or
Code:
framebuf(integer(i))<=PIXIN
help?

Just guessing though
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top