Error (10500): VHDL syntax error at near text "enable"; expectexpecting "begin", or
hello im still new in thie VHDL and have very liitle bit programming skill. i have created a program that read movement from a PIr sensor and i would like the output of is to be maintained in minutes..here i attaced my program but it seem that error Error (10500): VHDL syntax error at AcounterGpio2.vhd(29) near text "enable"; expecting "begin", or a declaration statement existed and i dont know how to repair it. how can i eliminated the error. herewith is the code that i developed. really need your help for this program..
how does i program my counter so that the output will be maintained in minutes..tq in advance
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use ieee.std_logic_unsigned.all;
entity AcounterGpio2 is
port( PIRin : in std_logic;
clk : in std_logic;
reset : in std_logic;
PIRout : out std_logic;
q : out std_logic);
end AcounterGpio2 ;
architecture bufferwithGpio_arc of AcounterGpio2 is
signal cnt,enable: std_logic;
begin
process(PIRin)
begin
if PIRin = '1' then
PIRout <= PIRin ;
else PIRout <= '0';
end if;
end process;
counter
rocess (clk)
enable <= PIRout;
begin
if (rising_edge(clk)) then
if reset = '1' then
cnt := 0;-- Reset the counter to 0
elsif enable = '1' then
cnt := cnt + 1;-- Increment the counter if counting is enabled
end if;
end if;
-- Output the current count
end process counter;
q <= cnt;
end bufferwithGpio_arc;