t52.vhd

来自「Workshop vhdl code from Esperan」· VHDL 代码 · 共 27 行

VHD
27
字号
--
-- This file tests support for Next, Exit Statements inside a while loop.
--
entity TEST is
	port (A : in  bit_vector (7 downto 0);
	      B : in  bit;
	      Z : out bit_vector (7 downto 0));
end TEST;
architecture T52 of TEST is
begin
	process(B, A)
		variable I : integer;
	begin
		I:= -1;
		while true loop
			I := I + 1;
			exit when (I > 7);
			if (A(I) = '0') then
				Z(I) <= '0';
				next;
			end if;
			Z(I) <= B;
		end loop;
	end process;
end T52;			

⌨️ 快捷键说明

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