Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

Error

Altera_Forum
Honored Contributor II
2,379 Views

I vonder what is wrong in this code: 

 

library ieee; 

use ieee.std_logic_1164.all; 

use ieee.numeric_std.all; 

use ieee.std_logic_unsigned.ALL; 

entity uppgift_vhdl_3a is 

port 

( Sys_clk, reset_n, knapp_in_1 : in std_logic; 

lysdiod_ut : out std_logic_vector(2 downto 0) 

); 

End entity uppgift_vhdl_3a; 

architecture rtl of uppgift_3a_debugg is 

---- internal signal declaration 

signal signal_raknarvarde : std_logic_vector(2 downto 0); 

signal old_knapp_in_1 :std_logic; 

begin 

process (sys_clk) 

begin 

if (rising_edge(sys_clk)) then 

if reset_n = '0' then ---Reset the counter to 0 

23 signal_raknarvärde <= "000"; 

25 elsif knapp_in_1 = '1'; then 

signal_raknarvarde <= signal_raknarvarde + '1'; 

else 

signal_raknarvarde <= signal_raknarvarde; 

end if; 

end if; 

end process; 

36 

:cry:....? 

 

Error come up.. 

 

Error (10500): VHDL syntax error at uppgift_3a.vhd(23) near text ¤ 

 

Error (10500): VHDL syntax error at uppgift_3a.vhd(23) near text "¤"; expecting "(", or "'", or "." 

 

Error (10500): VHDL syntax error at uppgift_3a.vhd(25) near text ";"; expecting "then" 

 

Error (10522): VHDL Syntax error at uppgift_3a.vhd(36): experienced unexpected end-of-file ; expecting "end", or "(", or an identifier, or a concurrent statement
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
1,342 Views

Not sure about line 23, try renaming your signal name without the "ä" and use "a" instead. (note the accent marks) 

 

line 25 should not have the ';' character between "if" and "then". 

 

Fixing both of these might clear up your problems.
0 Kudos
Altera_Forum
Honored Contributor II
1,342 Views

 

--- Quote Start ---  

Not sure about line 23, try renaming your signal name without the "ä" and use "a" instead. (note the accent marks) 

 

line 25 should not have the ';' character between "if" and "then". 

 

Fixing both of these might clear up your problems. 

--- Quote End ---  

 

 

 

Thanks :rolleyes:. Do you know what this is ? 

 

 

Error (10522): VHDL Syntax error at uppgift_3a.vhd(36): experienced unexpected end-of-file ; expecting "end", or "(", or an identifier, or a concurrent statement
0 Kudos
Altera_Forum
Honored Contributor II
1,342 Views

Ahh, didn't notice what you were missing - add 

 

end rtl; 

 

at the end. You need to close out your architecture.
0 Kudos
Reply