Académique Documents
Professionnel Documents
Culture Documents
use ieee.std_logic_1164.all;
entity tb_LAB23 is
end tb_LAB23;
architecture tb of tb_LAB23 is
component LAB23
port (CLK : in std_logic;
RESETN : in std_logic;
WR_RD : in std_logic;
DIR : in std_logic_vector (2 downto 0);
DIN : in std_logic_vector (3 downto 0);
SEG : out std_logic_vector (6 downto 0);
DISP : out std_logic_vector (7 downto 0));
end component;
constant TbPeriod : time := 100 ns; -- EDIT Put right period here
signal TbClock : std_logic := '0';
signal TbSimEnded : std_logic := '0';
begin
dut : LAB23
port map (CLK => CLK,
RESETN => RESETN,
WR_RD => WR_RD,
DIR => DIR,
DIN => DIN,
SEG => SEG,
DISP => DISP);
-- Clock generation
TbClock <= not TbClock after TbPeriod/2 when TbSimEnded /= '1' else '0';
stimuli : process
begin
-- EDIT Adapt initialization as needed
WR_RD <= '0';
DIR <= (others => '0');
DIN <= (others => '0');
RESETN <= '1';
end tb;