lemueltra

csm16_tb

Feb 23rd, 2017
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.71 KB | None | 0 0
  1. -- Descrição do contador síncrono módulo 16
  2. library ieee;
  3. use ieee.std_logic_1164.all;
  4.  
  5. entity csm16_tb is
  6. end csm16_tb;
  7.  
  8. architecture teste of csm16_tb is
  9.     component csm16 is
  10.         port(
  11.             clock: in std_logic;
  12.             clear: in std_logic;
  13.             enable: in std_logic;
  14.             q: out std_logic_vector(3 downto 0)
  15.         );
  16.     end component;
  17.     signal clk: std_logic := '0'; --clock
  18.     signal rst: std_logic := '0'; --clear
  19.     signal hab: std_logic := '1'; --enable
  20.     signal saida: std_logic_vector(3 downto 0); --q
  21.     begin
  22.         dut: csm16 port map(clk,rst,hab,saida);
  23.         process (clk)
  24.             begin
  25.                 clk <= not(clk) after 10 ns;
  26.             end process;
  27.         rst <= '1' after 50 ns;
  28.         hab <= '0' after 130 ns, '1' after 170 ns;
  29. end teste;
Advertisement
Add Comment
Please, Sign In to add comment