Hello!
I am new in the VHD, it is hard but i like learn. I found some code wat i realy can't understand alone.
The example program come from the Xilinks webpage:
What i dont understand can found in the DIRECTION process.
direction: process(clk)
begin
if clk'event and clk='1' then
delay_rotary_q1 <= rotary_q1;
if rotary_q1='1' and delay_rotary_q1='0' then
rotary_event <= '1';
rotary_left <= rotary_q2;
else
rotary_event <= '0';
rotary_left <= rotary_left;
end if;
end if;
end process direction;
I dont understand these two lines:
delay_rotary_q1 <= rotary_q1;
if rotary_q1='1' and delay_rotary_q1='0' then
In this case lookslike otary_q1 and delay_rotary_q1 every time contain same value and the if statement newer will be true. But i think it is just lookslike... But why? How does it work? Why need this?
Thanks for the help and sorry for the poor english!
Zsolt
I am new in the VHD, it is hard but i like learn. I found some code wat i realy can't understand alone.
The example program come from the Xilinks webpage:
What i dont understand can found in the DIRECTION process.
direction: process(clk)
begin
if clk'event and clk='1' then
delay_rotary_q1 <= rotary_q1;
if rotary_q1='1' and delay_rotary_q1='0' then
rotary_event <= '1';
rotary_left <= rotary_q2;
else
rotary_event <= '0';
rotary_left <= rotary_left;
end if;
end if;
end process direction;
I dont understand these two lines:
delay_rotary_q1 <= rotary_q1;
if rotary_q1='1' and delay_rotary_q1='0' then
In this case lookslike otary_q1 and delay_rotary_q1 every time contain same value and the if statement newer will be true. But i think it is just lookslike... But why? How does it work? Why need this?
Thanks for the help and sorry for the poor english!
Zsolt