Ripatti
Newbie level 1
Hi,
I'm new with logic design and simply don't get my process behaviour. I don't understand why adding a line:"temp1 <= '0';" affects to LED blink frequency?
Yes, I know that this code does not make sense, but it is just an example. I think that if-statement should always be true, since I set temp1 to 1 just before it, but apparently it is not!
I'm new with logic design and simply don't get my process behaviour. I don't understand why adding a line:"temp1 <= '0';" affects to LED blink frequency?
Yes, I know that this code does not make sense, but it is just an example. I think that if-statement should always be true, since I set temp1 to 1 just before it, but apparently it is not!
Code:
*************************
process (clk)
begin
if rising_edge(clk) then
temp1 <= '1';
if(temp1 = '1') then
temp1 <= '0'; -- if this line is added, then LED blink half as fast
if temp2 = '1' then
LED <= '0';
temp2 <= '0';
else
LED <= '1';
temp2 <= '1';
end if;
end if;
end if;
end process;
****************************
Last edited by a moderator: