Forum Discussion
Altera_Forum
Honored Contributor
13 years agoWell they do not run at the same time so if both are HIGH nothing happens but :
if CPIN goes HIGH while CPINH is LOW then clock Z if CPINH goes HIGH while CPIN is LOW then clock Z and that is the only time something should happen because Z should be LOW unless one of the two things above happens this clock runs a process that shifts bits. i have tried the code below and while it simulates what i want to happen i am not sure if i have a hardware issue or or if its still in software.
process(CPIN,CPINH)
BEGIN
if ((CPINH = '0' ) OR (CPIN = '0' ))then
if (CPIN = '1'OR CPINH = '1')then
Z <='1';
ELSE
Z<= '0';
END IF;
END IF;
end process;