Forum Discussion
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- True parity generator would be: process (a, b, c) odd_out <= ((a xor b) xor c); even_out <= (not odd_out); end process; If you actually want both outputs low when inputs are all low, then process (a, b, c) if (a or b or c) then odd_out <= ((a xor b) xor c); even_out <= (not odd_out); else odd_out <= '0'; even_out <= '0'; end if; end process; --- Quote End --- When i tried your code, it gives 4 errors when i tried to compile. Error: tyoe of identifier "a" does not agree with its usage as boolean type Error: tyoe of identifier "b" does not agree with its usage as boolean type Error: tyoe of identifier "c" does not agree with its usage as boolean type :(