⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tb_comparator.vhd

📁 这个是Xilinx编程的源码
💻 VHD
字号:
----------------------------------------  entity       = tb_comparator    ----  version      = 1.0              ----  last update  = 20/06/05         ----  author       = Jose Nunez       ------------------------------------------ test bench for comparatorlibrary ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_misc.all;use ieee.std_logic_textio.all;use std.textio.all;entity tb_comparator isend tb_comparator;architecture tb of tb_comparator iscomponent comparator    port (	  indata_a : in std_logic_vector(3 downto 0);	  indata_b : in std_logic_vector(3 downto 0); 	  lt : out std_logic; 	  eq : out std_logic   	      );end component; signal indata_a : std_logic_vector(3 downto 0);signal indata_b : std_logic_vector(3 downto 0);signal lt : std_logic;signal eq : std_logic;begin-- instantiate the device under testdut : component comparator    port map(	  indata_a => indata_a,	  indata_b => indata_b, 	  lt => lt, 	  eq => eq  	      ); test : processbegin	indata_a <= (others => '0');		indata_b <= (others => '0');	wait for (100 ns);	indata_a <= "0010";		indata_b <= "0001";	wait for (100 ns);	indata_a <= "0010";		indata_b <= "0011";	wait for (100 ns);	indata_a <= "0100";		indata_b <= "0100";	wait for (100 ns);	indata_a <= "0101";		indata_b <= "0100";            end process test;end tb; --end of architecture         

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -