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

it's wrong!

Altera_Forum
Honored Contributor II
1,195 Views

library ieee; 

use ieee.std_logic_1164.all; 

entity mux1 is  

port ( 

a,b:in std_logic_vector(7 downto 0); 

sel:in std_logic_vector(1 downto 0); 

c :out std_logic_vector (7 downto 0) 

); 

end mux1; 

architecture example of mux1 is  

begin  

process(a,b,s) 

begin  

if (sel="00")then 

c<="00000000"  

elsif (sel="01")then  

c<=a; 

elsif (sel="10")then 

c<=b; 

else 

c<=(others=>'Z'); 

 

end if; 

end process; 

end example ;  

Error (10500): VHDL syntax error at mux1.vhd(16) near text "elsif"; expecting ";" 

can you give a advice .thank you very much!
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
518 Views

In VHDL, every instruction has to terminated with ";", as the error message says. Usually, the error location is before the reported line number, in this case one line above. Shouldn't be too hard to find...

0 Kudos
Altera_Forum
Honored Contributor II
518 Views

o i got it .i find error

0 Kudos
Reply