Escolar Documentos
Profissional Documentos
Cultura Documentos
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity contadorN is
generic(N: natural := 4);
port(
clk: in std_logic;
rst: in std_logic;
ena: in std_logic;
count: out std_logic_vector(N-1 downto 0)
);
end;
-- ------------------------------------------------
-- -- Testbench
-- library IEEE;
-- use IEEE.std_logic_1164.all;
-- entity test is
-- end;
-- component contadorN is
-- generic(N: natural := 4);
-- port(
-- clk: in std_logic;
-- rst: in std_logic;
-- ena: in std_logic;
-- count: out std_logic_vector(N-1 downto 0)
-- );
-- end component;
-- begin
-- clk_t <= not clk_t after 10 ns;
-- rst_t <= '0' after 50 ns;
-- ena_t <= '0' after 620 ns, '1' after 800 ns;
-- int_cont: contadorN
-- generic map(N_t)
-- port map(clk => clk_t, rst => rst_t, ena => ena_t, Count =>
Count_t);
-- end;