Forum Discussion
Altera_Forum
Honored Contributor
15 years agoThe xor is a basic operation like not, or, and. Here is how it looks like :
entity I1 is
port
(
c : in std_logic;
b : in std_logic;
a : in std_logic;
odd_out : out std_logic;
even_out : out std_logic
);
end I1;
architecture arc of I1 is
signal result : std_logic;
begin
process (a, b, c)
begin
result <= a xor b xor c;
odd_out <= result;
even_out <= not result;
end process;
end arc;
There is a signal inside the architecture because the even_out signal is the complementary of the odd_out signal but you cannot read an output, so you cannot write directly : even_out <= not odd_even.