thanx lucbra for d reply i jus got a code but i am not so sure if it a synch. or asynch counter could any1 help me verify?stating why it is for either case??thanx
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_unsigned.all;
ENTITY sync_counter IS
port (clock, Resetn, E : IN STD_LOGIC;
Q : OUT STD_LOGIC_VECTOR (3 DOWNTO 0));
END sync_counter;
ARCHITECTURE Behavior OF sync_counter IS
SIGNAL Count : STD_LOGIC_VECTOR (3 DOWNTO 0);
BEGIN
PROCESS (Clock, Resetn)
BEGIN
IF REsetn = '0' THEN
Count <= "0000" ;
ELSIF (Clock'EVENT AND Clock = '1')THEN
IF E = '1' THEN
Count <= Count + 1;
ELSE
Count <= Count;
END IF;
END IF;
END PROCESS;
Q <= Count;
END Behavior;