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

📄 ctl_2.vhd

📁 可编程光纤延迟线的开发系统!对仪器的开发很有帮助!
💻 VHD
字号:
Library ieee;
Use ieee.std_logic_1164.all;
Entity ctl_2 is
Port(
	clk		:in std_logic;						-- 作时钟使用
	P1_0	:in std_logic;						-- 控制脉冲宽度
	T		:in std_logic_vector(19 downto 0);	-- 20位中间控制信号
	Q		:out std_logic_vector(19 downto 0);	-- 开关控制信号
	NQ		:out std_logic_vector(19 downto 0)	-- 开关控制信号
	);
End ctl_2;
Architecture behavior of ctl_2 is
	signal tmp1,tmp2		:std_logic_vector(19 downto 0);			
Begin		
	Q<=tmp1; 
	NQ<=tmp2; 	
	process(clk,P1_0)
	begin
		if (P1_0='0') then					-- 关闭输出信号,形成脉冲
			tmp1<="00000000000000000000";
			tmp2<="00000000000000000000";
		elsif (clk'event and clk='0') then
			if (P1_0='1') then
				tmp1<=T;
				tmp2<=NOT T;
			end if;		
		end if;
	end process;
End behavior;

⌨️ 快捷键说明

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