pearl87
Newbie level 4
how to create a if else statement when the statement i as below...
if a>b.c
{P='0110';
D='0000'
eleseif c>b>a
P='0110';
D='1111"
eleseif b>c>a
P='0110';
D='0000'
else a=b=c
P='0000'
D='0000'
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity comparator is
port( a, b, c : in std_logic_vector( 6 downto 0); --
p, D : out std_logic_vector( 3 downto 0));
end comparator;
architecture processing of comparator is
begin
process (a, b, c)
begin
if (a=> b)
then p<='1';
else
p<='0';
end if;
end process;
end architecture processing;
i try to do but dunno what is the problem as i am still new to VHDL codings... please do help me as i need to do this assignment
if a>b.c
{P='0110';
D='0000'
eleseif c>b>a
P='0110';
D='1111"
eleseif b>c>a
P='0110';
D='0000'
else a=b=c
P='0000'
D='0000'
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity comparator is
port( a, b, c : in std_logic_vector( 6 downto 0); --
p, D : out std_logic_vector( 3 downto 0));
end comparator;
architecture processing of comparator is
begin
process (a, b, c)
begin
if (a=> b)
then p<='1';
else
p<='0';
end if;
end process;
end architecture processing;
i try to do but dunno what is the problem as i am still new to VHDL codings... please do help me as i need to do this assignment