VHDL for FPGA Design/T Flip Flop

Synchronous Positive edge T Flip-Flop with Reset and Clock enable

 
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
 
entity T_FF_VHDL is
   port( T: in  std_logic;
         Reset: in std_logic;
         Clock_enable: in std_logic;
         Clock: in std_logic;
         Output: out std_logic);
end T_FF_VHDL;
 
architecture Behavioral of T_FF_VHDL is
   signal temp: std_logic;
begin
   process (Clock) 
   begin
      if Clock'event and Clock='1' then                 
         if Reset='1' then   
            temp <= '0';
         elsif Clock_enable ='1' then
            if T='0' then
               temp <= temp;
            elsif T='1' then
               temp <= not (temp);
            end if;
         end if;
      end if;
   end process;
   Output <= temp;
end Behavioral;
↑Jump back a section

Simulation Results

 TFF Final.png
↑Jump back a section

Generated Symbol

 File:T FF SCH F.png
↑Jump back a section

Read in another language

This page is available in 1 language

Last modified on 8 September 2010, at 17:34