Altera_Forum
Honored Contributor
15 years agoNeed help with 3 bit parity generator!
Hello,
I'm tasked to design a 3 bit parity generator by using VHDL code but i can't seem to get it right. Can anyone help me with this? Thanks in advance! This is what i have done: library ieee; use ieee.std_logic_1164.all; entity paritygen is port (a, b, c : in std_logic; odd_out, even_out : out std_logic); end paritygen; architecture work of paritygen is begin process (a, b, c) if (a ='0', b ='0', c ='0') then odd_out <= "0"; even_out <= "0"; else odd_out <= ((a xor b) xor c); even_out <= ((a xor b) xnor c); end process;