Advertisement
milanmetal

[VHDL] D Flip-flop Asynchronous Preset // Behavioral

Apr 1st, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.88 KB | None | 0 0
  1. ----------------------------------------------------------------------------------
  2. -- Company:
  3. -- Engineer:
  4. --
  5. -- Create Date:    21:30:35 04/01/2017
  6. -- Design Name:
  7. -- Module Name:    D_FF_ASYNC_PRESET_BEH - Behavioral
  8.  
  9. ----------------------------------------------------------------------------------
  10. library IEEE;
  11. use IEEE.STD_LOGIC_1164.ALL;
  12.  
  13. entity D_FF_ASYNC_PRESET_BEH is
  14.     PORT(
  15.         CLK:        IN std_logic;   -- ulazni port dozvole upisa
  16.         D:      IN std_logic;   -- asinhroni preset ulaz
  17.         PRESET:     IN std_logic;   -- ulazni port podataka
  18.         Q:          OUT std_logic   -- izlazni port podataka 1
  19.     );
  20. end entity D_FF_ASYNC_PRESET_BEH;
  21.  
  22. architecture Behavioral of D_FF_ASYNC_PRESET_BEH is
  23. begin
  24.     D_FF: process(CLK, PRESET) is
  25.     begin
  26.         if(PRESET = '1') then
  27.             Q <= '1';
  28.         else
  29.             if (CLK'EVENT and CLK = '1') then
  30.                 Q <= D;
  31.             end if;
  32.         end if;
  33.     end process;
  34.  
  35. end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement