This is my code. I get the error: ERROR:HDLParsers:164 - "C:/Xilinx/3-bitcounter/3bc.vhd" Line 31. parse error, unexpected INTEGER_LITERAL, expecting IDENTIFIER. Does anyone know what I can do to correct this. I also get the warning: WARNING:HDLParsers:3481 - Library work has no units. Did not save reference file "xst/work/hdllib.ref" for it.
entity 3bc is
Port ( clk : in STD_LOGIC;
reset : in STD_LOGIC;
sel : in STD_LOGIC;
q : out STD_LOGIC);
end 3bc;
architecture Behavioral of 3bc is
begin
process(clk,reset)
begin
if reset = '1' then
q <= "000";
else if rising_edge(clk) and reset ='0' and sel = '0' then
q <= q+1;
if rising_edge(clk) and reset = '0' and sel = '1' then
q <= q+2;
end if;
end if;
end process;
end Behavioral;
entity 3bc is
Port ( clk : in STD_LOGIC;
reset : in STD_LOGIC;
sel : in STD_LOGIC;
q : out STD_LOGIC);
end 3bc;
architecture Behavioral of 3bc is
begin
process(clk,reset)
begin
if reset = '1' then
q <= "000";
else if rising_edge(clk) and reset ='0' and sel = '0' then
q <= q+1;
if rising_edge(clk) and reset = '0' and sel = '1' then
q <= q+2;
end if;
end if;
end process;
end Behavioral;