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

📄 t31.vhd

📁 Workshop vhdl code from Esperan
💻 VHD
字号:
--
-- This file tests support for Generic map with integers.
--
entity AND_GATE is
	generic (SIZE : integer);
	port( 	A,B : in  bit_vector(SIZE -1 downto 0);
		Z   : out bit_vector(SIZE -1 downto 0));
end AND_GATE;
architecture RTL of AND_GATE is
begin
	Z <= A and B;
end RTL;

entity TEST is
	port( 	A,B : in  bit_vector(3 downto 0);
	    	Z   : out bit_vector(3 downto 0));
end TEST;
architecture T31 of TEST is
	component AND_GATE
		generic (SIZE : integer);
		port( 	A,B : in  bit_vector(SIZE -1 downto 0);
			Z   : out bit_vector(SIZE -1 downto 0));
	end component;
begin
	U1: AND_GATE 
		generic map (SIZE => 4)
		port map (A,B,Z);
end T31;

⌨️ 快捷键说明

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