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

📄 aa.vhd

📁 对频率计闸门处复杂逻辑关系的处理
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
entity aa is
	port(cont,gate,fenq,DATERD:in std_logic;
	     count,kk:out std_logic);
end entity aa;

architecture bb of aa is
	signal flag1,flag2,flag3,sedflag1:std_logic;
begin
	P1:process (cont,flag2,flag3)
	
	   begin
	   		if flag2='1' then 
				flag1<='0';
			elsif flag3='1' then
				sedflag1<='0';
			elsif rising_edge(cont) then
				if gate='0' then
					flag1<='1';
				
				else
					sedflag1<='1';
				end if;
			end if;
	   end process P1;
	P2:count<=fenq and gate and (flag1 or flag3);
	
	P3:process (gate,DATERD)
	   begin
			if DATERD='0' then
				flag2<='0';kk<='0';
			elsif falling_edge(gate)then
				if flag1='1'  or flag3='1' then
					flag2<='1';
					kk<='1';
				elsif flag3='1' then 
					kk<='1';
				end if;
			end if;
	   end process P3;
	P4:process(gate,flag2,sedflag1)
	   begin
			if flag2='1' then
			   flag3<='0';
			elsif rising_edge(gate) then
				if sedflag1='1' then
					flag3<='1';
				end if;
			end if;
		end process;
				   			
end architecture bb ;
		
	

⌨️ 快捷键说明

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