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

📄 feng1.vhdl

📁 四人抢答器的实现
💻 VHDL
字号:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

--  Uncomment the following lines to use the declarations that are
--  provided for instantiating Xilinx primitive components.
--library UNISIM;
--use UNISIM.VComponents.all;
--此模块在任一个选手按下按键后,输出高电平给锁存器,锁存当时的按键状态.由于没有时钟同步,所以
--锁存的延时时间只是硬件延时时间,从而出现锁存错误的概率接近零.
entity feng1 is
    Port ( cp,clr : in std_logic;
           q : out std_logic);
end feng1;

architecture Behavioral of feng1 is

begin
   process(cp,clr)
   begin
     if clr='0' then
	  q<='0';
     elsif cp'event and cp='0'then
	  q<='1';
	end if;
   end process;
end Behavioral;

⌨️ 快捷键说明

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