jioujiaoyan.vhd

来自「收集的CPLD_FPGA很好的代码」· VHDL 代码 · 共 22 行

VHD
22
字号
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity jioujiaoyan is
	port(a:in std_logic_vector(7 downto 0);
			q:out std_logic);
end jioujiaoyan;
architecture rtl of jioujiaoyan is
begin
PROCESS(a)
variable tmp:std_logic;
BEGIN
	tmp:='0';
	for i in a'high downto a'low loop
		tmp:=tmp xor a(i);
	end loop;
	q<=tmp;
END PROCESS;
end rtl;

⌨️ 快捷键说明

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