Error with data and its width mismatch

Status
Not open for further replies.

raghava

Member level 2
Joined
Jul 31, 2008
Messages
51
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,870
Hi all,

I am facing error with the following code.
The error line is --if(count = '0')........................error is --0 definitions of operator "=" match here
What might be the cause.
Any help is appreciated.

procedure non_maximal_sppression is
variable count: integer:=0;
begin
count := 0;
for i in 0 to 3 loop
for j in 0 to 3 loop
if(cornerness(row*IC+col) < non(i*3+j)) then
count := 1;
end if;
end loop;
end loop;

if(count = '0') then
non_max(row*IC+col) <= cornerness(row*IC+col);
else
non_max(row*IC+col) <= real(0);
end if;

end loop;
end loop;
end non_maximal_sppression;:|
 

Hi,

You declare count as integer but in the comparison you use std_(u)logic comparison '0'. It should be just count = 0

Devas
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…