Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21069 Discussions

another question

Altera_Forum
Honored Contributor II
1,480 Views

library ieee; 

use ieee.std_logic_1164.all; 

use ieee.std_logic_unsigned.all; 

entity Ttrigger2 is 

port(t,clk:in std_logic; 

q:buffer std_logic); 

end Ttrigger2; 

architecture b of Ttrigger2 is 

begin 

signal qq:std_logic; 

process(clk) 

begin 

if t='1' then qq<=not qq; 

else qq<=qq; 

end if; 

end process; 

q<=qq; 

end b; 

Error (10500): VHDL syntax error at Ttrigger2.vhd(10) near text "signal"; expecting "end", or "(", or an identifier ("signal" is a reserved keyword), or a concurrent statement
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
370 Views

Move the line signal qq:std_logic; between architecture and begin. 

In addition, you should use a if rising_edge(clk) condition, otherwise that code won't work.
0 Kudos
Altera_Forum
Honored Contributor II
370 Views

you really should be fixing syntax problems yourself. Have you got a VHDL tutorial?

0 Kudos
Altera_Forum
Honored Contributor II
370 Views

thank you two.i have a vhdl book.forgive me. tomorrow i have a vhdl exam and i'm anxious .

0 Kudos
Reply