i have 2 errors. the errors are in end process and end architecture. i have tried adding another end if but it is not helping.
Line 40: ERROR, syntax error near 'process'.
Line 46: ERROR, syntax error near 'ARCHITECTURE'.
here is the full code
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
ENTITY four_bit_new_counter IS
port (clk , rst , start , stop : in std_logic ;
output : out std_logic_vector(3 downto 0);
carry : out std_logic );
END ENTITY four_bit_new_counter;
ARCHITECTURE one OF four_bit_new_counter IS
signal qout: unsigned (3 downto 0);
signal cout: std_logic ;
BEGIN
process (clk,rst,start,stop)
begin
if (rst ='1') then
qout <= (qout'range => '0');
cout <= '0' ;
elsif (clk'event and clk = '1') then
cout <= '0' ;
if start='1' and stop='0' then
if qout = '9' then
cout <= '1' ;
qout <= '0' ;
else
qout <= qout+1 ;
endif ;
end process ;
output <= std_logic_vector(qout);
carry <= cout ;
END ARCHITECTURE one;