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

📄 add.vhd

📁 关于CPLD程序
💻 VHD
字号:
Library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity add is port(
	clk:	in std_logic;--两个控制信号
	clk1:   in std_logic;
add:	out std_logic_vector(7 downto 0));
end entity add;

architecture depict of add is
	signal tmp:	std_logic_vector(7 downto 0);
begin
	process(clk)
	begin
		if(rising_edge(clk))then
			case clk1 is
                 when '0'=>tmp<=tmp+2;--ts <= ts + 1;

                 when '1'=>tmp<=tmp+1; --ts <= ts + 1;
                 when  others=>tmp<=tmp; --ts <= ts + 1;      
          end case;
	end if;
end process;
	add<=tmp;
end depict;

⌨️ 快捷键说明

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