这是tb的
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_unsigned.all;
ENTITY count_0_to_5_tb IS
END count_0_to_5_tb;
ARCHITECTURE behavior OF count_0_to_5_tb IS
COMPONENT count_0_to_5
PORT(clk : IN std_logic;
count : buffer std_logic_vector(2 downto 0);
reset_n : IN std_logic;
Q: out std_logic
);
END COMPONENT;
signal clk : std_logic := '0';
signal reset_n : std_logic := '1';
signal count : std_logic_vector(2 downto 0);
signal Q: std_logic;
constant clk_period : time := 1 ms;
BEGIN
uut: count_0_to_5 PORT MAP (
clk => clk,
count => count,
reset_n => reset_n,
Q => Q
);
clk_process :process
begin
clk