Guest User

Untitled

a guest
Oct 15th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.44 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3.  
  4. entity ff_t is
  5.  
  6. port
  7.  
  8. (
  9. t : in std_logic;
  10. ck : in std_logic;
  11. set: in std_logic;
  12. rst : in std_logic;
  13. q, nq : out std_logic);
  14.  
  15. end ff_t;
  16.  
  17. architecture comportamental of ff_t is
  18.  
  19. begin
  20.  
  21. process (ck, set, rst)
  22. begin
  23. if (rst='1') then q<= '0'; nq<='1';
  24. elsif (set='1') then q<='1'; nq <= '0';
  25. elsif (ck'event and ck='0') then
  26. q<= not(t); nq <=t;
  27. end if;
  28. end process;
  29. end comportamental;
Add Comment
Please, Sign In to add comment