📄 t_dismux2.vhd
字号:
-----------------------------------------------------------------------
--
-- Original Code Copyright (c) 1999 by Esperan. All rights reserved.
-- www.esperan.com
--
-- This source file may be used and distributed without restriction
-- provided that this copyright statement is not removed from the file
-- and that any derivative work contains this copyright notice.
--
-- Esperan VHDL Alarm Clock Lab Exercise Design V5.0
--
-- T_dismux2.vhd
-- Testbench for the display multiplexer with SOUND_ALARM function
--
--------------------------------------------------------------------
Library IEEE;
use IEEE.Std_Logic_1164.all;
entity T_DISMUX is
end T_DISMUX;
architecture TEST of T_DISMUX is
component DISMUX
port ( ALARM_TIME, CURRENT_TIME : in std_logic_vector (3 downto 0);
SHOW_A : in std_logic;
SOUND_ALARM : out std_logic;
DISPLAY_TIME : out std_logic_vector (3 downto 0)
);
end component;
signal ALARM_TIME, CURRENT_TIME : std_logic_vector (3 downto 0);
signal SHOW_A : std_logic;
signal SOUND_ALARM : std_logic;
signal DISPLAY_TIME : std_logic_vector (3 downto 0);
begin
uut : DISMUX port map (ALARM_TIME,
CURRENT_TIME,
SHOW_A,
SOUND_ALARM,
DISPLAY_TIME);
---------------------------------------
-- Process to generate stimulus ...
---------------------------------------
STIMULUS: process
begin
ALARM_TIME <= "0000";
CURRENT_TIME <= "0000";
SHOW_A <= '0';
wait for 10 ns;
ALARM_TIME <= "1010";
CURRENT_TIME <= "1111";
SHOW_A <= '0';
wait for 10 ns;
SHOW_A <= '1';
wait for 10 ns;
CURRENT_TIME <= "0000";
SHOW_A <= '1';
wait for 10 ns;
CURRENT_TIME <= "1000";
SHOW_A <= '0';
wait for 10 ns;
CURRENT_TIME <= "1010";
SHOW_A <= '0';
wait for 10 ns;
wait;
end process STIMULUS;
end TEST;
---------------------------------------
-- configuration...
---------------------------------------
configuration CFG_T_DISMUX of T_DISMUX is
for TEST
end for;
end CFG_T_DISMUX;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -