T
Thunder
I have two clocks- clk and clk_fast, and a counter which is supposed
to count the number of rising edges of clk_fast. Also count must reset
during every rising edge of clk. I use a one-bit signal called 'res'
which serves the purpose of resetting count. I have the following code
for the purpose.
process(clk,res,clk_fast)
begin
if (clk'event and clk='1') then
res <= '1';
elsif (clk_fast'event and clk_fast='1' and res='1' ) then
res <= '0';
end if;
end process;
process(clk_fast,res)
begin
if (res'event and res='1' )then
cnt <= 0;
elsif (clk_fast'event and clk_fast='1') then
cnt <= cnt + 1;
end if;
end process;
The above code generates an error message saying "Signal cnt cannot be
synthesized, bad synchronous description."
Similar error for 'res' too.
Could u please help me out with it?
to count the number of rising edges of clk_fast. Also count must reset
during every rising edge of clk. I use a one-bit signal called 'res'
which serves the purpose of resetting count. I have the following code
for the purpose.
process(clk,res,clk_fast)
begin
if (clk'event and clk='1') then
res <= '1';
elsif (clk_fast'event and clk_fast='1' and res='1' ) then
res <= '0';
end if;
end process;
process(clk_fast,res)
begin
if (res'event and res='1' )then
cnt <= 0;
elsif (clk_fast'event and clk_fast='1') then
cnt <= cnt + 1;
end if;
end process;
The above code generates an error message saying "Signal cnt cannot be
synthesized, bad synchronous description."
Similar error for 'res' too.
Could u please help me out with it?