Advertisement
voik3

Untitled

Jun 26th, 2019
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.49 KB | None | 0 0
  1.  
  2. library IEEE;
  3. use ieee.std_logic_arith.all;
  4. use ieee.std_logic_unsigned.all;
  5. use IEEE.STD_LOGIC_1164.ALL;
  6.  
  7. entity Licznik_modulo4 is
  8.     Port ( wej : in  STD_LOGIC;
  9.            wyj : out  STD_LOGIC_vector(1 downto 0));
  10. end Licznik_modulo4;
  11.  
  12. architecture Behavioral of Licznik_modulo4 is
  13.     signal licznik: std_logic_vector(1 downto 0) := "00";
  14.     begin
  15.     process(wej)
  16.         begin
  17.             if wej'event then
  18.                 licznik <= licznik+1;
  19.             end if;
  20.     end process;
  21.     wyj <= licznik;
  22.  
  23. end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement