Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compare 2 vectores

Status
Not open for further replies.

Eskadril

Technical User
Mar 26, 2011
1
DK
im having a problem whit my program. i need to compare 2 Vectors but i keep getting the error
: Line 28. parse error, unexpected EQ, expecting PIPE or ROW

my code is:


library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;


entity PointLogic is
port(
point: in std_logic_vector(15 downto 0);
Rolval, Bud, sats: in std_logic_vector (7 downto 0);
RST, Point_EN: in std_logic;
NextPoint: out std_logic_vector(15 downto 0)
);

end PointLogic;

architecture Behavioral of PointLogic is

begin

LogicProc : process(bud, rolval)
begin

NextPoint <= "0000000000000000";

case NextPoint is
when Bud = Rolval then
NextPoint <= point + sats;
else
if Bud /= Rolval then
NextPoint <= Point - sats;
end if
end if;

end Behavioral;


please help
 
change
NextPoint <= "0000000000000000";

case NextPoint is
when Bud = Rolval then
NextPoint <= point + sats;
else
if Bud /= Rolval then
NextPoint <= Point - sats;
end if
end if;

to
NextPoint <= "0000000000000000";

if Bud == Rolval then
NextPoint <= point + sats;
else -- if get here then not equal
NextPoint <= Point - sats;
end if;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top