D-Flipflop

D-Flipflop

D-Flipflop(Behavioural Model)

library ieee;
use ieee.std_logic_1164.all;
 entity D_FlipFlop is
  port( D : in std_logic;
       CLK : in std_logic;
       Q : inout std_logic;
       Q1 : out std_logic);
 end entity D_FlipFlop;
architecture D_FF of D_FlipFlop is
  begin
   process (CLK)
    begin
     if CLK='1' then
     Q<= D;
     Q1<= NOT Q; -- Q1 REFERS TO Q' (Q BAR)--
     end if;
   end process;
  end D_FF;