Advertisement
Guest User

Untitled

a guest
Jan 26th, 2015
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. libray IEEE;
  2. use IEEE.std_logic_1164.all;
  3. use IEEE.std_logic_unsigned.all;
  4. use IEEE.std_logic_arith.all;
  5.  
  6.  
  7. entity trigger is
  8. port(data: in std_logic,
  9. reset: in std_logic,
  10. klok: in std_logic,
  11. partroon: in std_logic_vector(7 downto 0)
  12. actie: out std_logic
  13. );
  14. end trigger;
  15.  
  16. architecture tr of trigger is
  17. begin
  18. process(klok)
  19. variable sign_val: std_logic := 0;
  20. variable teller: integer'range(8)
  21. begin
  22. if sign_val = data then
  23. teller = teller + 1;
  24. if teller > 7 then
  25. actie <= 1;
  26. end if;
  27. else
  28. sign_val := data;
  29. teller := 0;
  30. end if;
  31. if reset = 1 then
  32. actie <= 0;
  33. end if;
  34. end process;
  35. end tr;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement