Forum Discussion
Altera_Forum
Honored Contributor
16 years agocomparator
i need to do Greater or equal than Less or Equal than not equal but it is not working with me could you check this code i have done greater or equal than but it is not workin but a...
Altera_Forum
Honored Contributor
16 years agoThis is rather basic knowledge, but I'll humour you.
You might invest in a few good books on VHDL, I suggest you get a copy of: Circuit Design with VHDL by Volnei A. Pedroni ISBN 978-0-262-16224-1process( Clk )
begin
if rising_edge( Clk ) then
IF a > b THEN
compare <= "010110";
ELSIF a < b THEN
compare <= "001101";
ELSIF a = b THEN
compare <= "100011";
ELSE
compare <= "111111";
END IF;
end if ;
END PROCESS;