Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

quartus 2: can't determine definition of operator "*"

I've got this error for the following code:

library IEEE;

--use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_unsigned.ALL;

use IEEE.STD_LOGIC_TEXTIO.ALL;

use ieee.numeric_std.all;

--package image_array_2 is

-- type image_array is array(0 to 49, 0 to 49) of unsigned(7 downto 0);

--type image_derivadas is array(0 to 49, 0 to 49) of unsigned (8 downto 0);

--end package image_array_2;

use work.imagens.all;

entity hornteste is

Port (

clk : in bit;

imagem: in image_array;

imagemanterior: in image_array;

Ix: out image_derivadas;

Iy: out image_derivadas;

It: out image_derivadas

);

end hornteste;

architecture Behavioral of hornteste is

begin

process (clk)

begin

If (clk 'event and clk = '1') then

for x in imagem'range(1) loop

for y in imagem'range(2) loop

Ix(x,y) <= 1/4 * (imagemanterior(x,y+1) - imagemanterior(x,y) + imagemanterior (x+1,y+1) - imagemanterior(x+1,y) + imagem(x,y+1) - imagem(x,y)+imagem(x+1,y+1)-imagem(x,y+1));

Iy(x,y) <= 1/4*(imagemanterior(x+1,y) - imagemanterior(x,y) + imagemanterior(x+1,y+1) - imagemanterior(x,y+1) + imagem(x+1,y) - imagem(x,y) + imagem(x+1,y+1) -imagem(x,y+1));

It(x,y) <= 1/4 * (imagem(x,y) - imagemanterior(x,y) + imagem(x+1,y)- imagemanterior(x+1,y) +imagem(x,y+1)- imagemanterior(x,y+1) + imagem(x+1,y+1)- imagemanterior(x+1,y+1));

end loop;

end loop;

end if ;

end process;

end Behavioral;

I've used the unsigned type for the signals in opertation. what's wrong with it? thanks in advance.

12 Replies