Search This Blog

Saturday, July 20, 2013

Design of D Flip Flop Using Behavior Modeling Style (VHDL Code).







Design of D Flip Flop using Behavior Modeling Style -



Output Waveform :   D- Flip Flop




VHDL Code -



-------------------------------------------------------------------------------
--
-- Title       : d_flip_flop
-- Design      : vhdl_upload 1
-- Author      : Naresh Singh Dobal
-- Company     : nsd 
-- VHDL Tutorials & exercise by Naresh Singh Dobal
--
-------------------------------------------------------------------------------
--
-- File        : D flip flop.vhd


library IEEE;
use IEEE.STD_LOGIC_1164.all;

entity d_flip_flop is
     port(
         din : in STD_LOGIC;
         clk : in STD_LOGIC;
         reset : in STD_LOGIC;
         dout : out STD_LOGIC
         );
end d_flip_flop;

architecture d_flip_flop_arc of d_flip_flop is
begin

    dff : process (din,clk,reset) is
    begin
        if (reset='1') then
            dout <= '0';
        elsif (rising_edge (clk)) then
            dout <= din;
        end if;
    end process dff;

end d_flip_flop_arc;

2 comments: