Forum Discussion
Altera_Forum
Honored Contributor
15 years agoHelp needed for this 3 bit parity generator/checker.
:cry: Im a total Noob and seriously need help in my VHDL. the question: To design a 3-bit parity generator/checker that has three data inputs (A to C) and two odd/even parity outputs (odd_o...
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.