nealmurray
Programmer
I'm working on this project for school and I can't seem to get it to work properly heres the first part of my code i think the error is in this somewhere but if not i'll show the rest of my code
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE work.INT_TYPES.all;
-- Entity Declaration
ENTITY COUNTER IS
-- {{ALTERA_IO_BEGIN}} DO NOT REMOVE THIS LINE!
PORT
(
CLK : IN STD_LOGIC;
RN : IN STD_LOGIC;
START : IN STD_LOGIC;
Q : BUFFER count
);
-- {{ALTERA_IO_END}} DO NOT REMOVE THIS LINE!
END COUNTER;
-- Architecture Body
ARCHITECTURE COUNTER_architecture OF COUNTER IS
BEGIN
PROCESS (CLK, RN, START)
BEGIN
IF RN = '0' THEN
Q <= 0;
else IF START = '1'THEN
IF (CLK'event AND CLK='1' and Q < 9300) THEN
Q <= Q + 1;
end if;
end if;
end if;
END PROCESS;
END COUNTER_architecture;
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE work.INT_TYPES.all;
-- Entity Declaration
ENTITY COUNTER IS
-- {{ALTERA_IO_BEGIN}} DO NOT REMOVE THIS LINE!
PORT
(
CLK : IN STD_LOGIC;
RN : IN STD_LOGIC;
START : IN STD_LOGIC;
Q : BUFFER count
);
-- {{ALTERA_IO_END}} DO NOT REMOVE THIS LINE!
END COUNTER;
-- Architecture Body
ARCHITECTURE COUNTER_architecture OF COUNTER IS
BEGIN
PROCESS (CLK, RN, START)
BEGIN
IF RN = '0' THEN
Q <= 0;
else IF START = '1'THEN
IF (CLK'event AND CLK='1' and Q < 9300) THEN
Q <= Q + 1;
end if;
end if;
end if;
END PROCESS;
END COUNTER_architecture;