Error in simple code

OP #2903926
Rate this post
• ▲ useful
▼ not useful
Hello everyone, I am a newbie in VHDL, Im programming a code for 
simulating a T flip flop but all I get are errors.. Right now my code is 
not supossed to do nothing but giving the value '1' to q_temp but Im 
getting this error in line 47 and I dont know why, can anyone help me 
please?

Line 47. Variable 'q_temp' q_temp is at left hand side of signal 
assignment statement.
1
entity TFF2 is
2
    Port ( T : in  STD_LOGIC;
3
           CLK : in  STD_LOGIC;
4
           Q : out  STD_LOGIC;
5
           notQ : out  STD_LOGIC);
6
end TFF2;
7

8
architecture Behavioral of TFF2 is
9

10
begin
11

12

13

14
  Tff: process (CLK, T) is
15
    variable q_temp: std_logic :='0';
16
      begin
17
       if (clk'event and CLK = '1' and T = '1') then 
18
      q_temp <= '1';  --LINE 47
19
     end if;
20
  end process;
21
    
22
  --q_next<='1';  
23
  --q_past <= '1';
24
 -- Q <= q_temp;
25
  --Q <= '1';
26
  
27
end Behavioral;

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.