Forum Discussion
Altera_Forum
Honored Contributor
15 years agoVHDL Code Of 2 input XOR -gate
Hi, I am new to VHDL programing and i had written a VHDL code on 2 input XOR gate using process and it compiles successfully but in test bench waveform i am unable to get the output that is for al...
Altera_Forum
Honored Contributor
15 years agoYour process looks ok to me
though you can simplify it to:
process(A,B)
begin
if (A = '1' and B = '0') or (A = '0' and B = '1') then
C <= '1';
else
C <= '0';
end if;
end process;
either way it should work. Change the entity name to something other than xor2 just in case. Otherwise there is some thing wrong with your observation.