G
Georges Konstantinidis
Guest
Dear all
I'm deseprately trying to make an asynchronous counter to count the number
of inputs I have on a pin. I also want a reset input.
I copied the last version of my code at this e-mail .
The synthesis looks good but an error comes at the implementation design. I
don't kow to to do any more.
Thank you for fixing my bugs, Georges.
library ieee;
use ieee.std_logic_1164.all;
entity counter is
port(Load, Rst: in std_logic;
LED: out std_logic_vector(0 to 7)
);
end counter;
architecture behaviour of counter is
signal Qreg: std_logic_vector(0 to 7);
begin
process(Rst, Load)
begin
if Rst = '1' then -- Async reset
Qreg <= "00000000";
elsif Load='1' then
Qreg<=Qreg+1;
end if;
end process;
LED <= Qreg;
end behaviour;
I'm deseprately trying to make an asynchronous counter to count the number
of inputs I have on a pin. I also want a reset input.
I copied the last version of my code at this e-mail .
The synthesis looks good but an error comes at the implementation design. I
don't kow to to do any more.
Thank you for fixing my bugs, Georges.
library ieee;
use ieee.std_logic_1164.all;
entity counter is
port(Load, Rst: in std_logic;
LED: out std_logic_vector(0 to 7)
);
end counter;
architecture behaviour of counter is
signal Qreg: std_logic_vector(0 to 7);
begin
process(Rst, Load)
begin
if Rst = '1' then -- Async reset
Qreg <= "00000000";
elsif Load='1' then
Qreg<=Qreg+1;
end if;
end process;
LED <= Qreg;
end behaviour;