lupineye
Junior Member level 3
When I make the counter with DLL, I used the below two code, but when clock goes higher, the second code didn't work. Can anyone tell me why?
thank you
first ,
process (clk, rst)
begin
if rst ='1' then
counter <= (others => '0);
elsif clk'event and clk='1' then
counter <= counter +1;
end if;
end process;
second,
process (clk, rst)
begin
if rising_edge(clk) then
if rst ='1' then
counter <= (others =>'0');
else
counter <= counter +1;
end if;
end process;
thank you
first ,
process (clk, rst)
begin
if rst ='1' then
counter <= (others => '0);
elsif clk'event and clk='1' then
counter <= counter +1;
end if;
end process;
second,
process (clk, rst)
begin
if rising_edge(clk) then
if rst ='1' then
counter <= (others =>'0');
else
counter <= counter +1;
end if;
end process;