Advertisement
Guest User

Untitled

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