Advertisement
ceterumcenseo

Dynamic D Flip-Flop

Oct 20th, 2022
1,906
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.51 KB | None | 0 0
  1. library IEEE;
  2. use IEEE.std_logic_1164.all;
  3.  
  4. -- Description of a dynamic rising clock edge triggered
  5. -- D flip-flop with high-active asynchronous reset.
  6.  
  7. entity Dflipflop is
  8.   port (clk : in STD_LOGIC;
  9.         res : in STD_LOGIC;
  10.         D   : in STD_LOGIC;
  11.         Q   : out STD_LOGIC);
  12. end entity;
  13.  
  14. architecture impl of Dflipflop is
  15. begin
  16.   process (clk, res)
  17.   begin
  18.     if res = '1' then
  19.       Q <= '0';
  20.     elsif rising_edge(clk) then
  21.       Q <= D;
  22.     end if;
  23.   end process;
  24. end architecture;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement