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

📄 fren_cout.vhd

📁 用VHDL实现的键盘扫描程序 可以稍微修改就可使用
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;


entity fren_cout is
    port(  reset:in std_logic;
           clk_in:in std_logic;
           data_in:in std_logic;
           couter:out std_logic_vector(7 downto 0)
         );
end fren_cout;


architecture a of fren_cout is
   signal temp:std_logic_vector(7 downto 0);
   begin
    process(clk_in,reset)
    begin
      if(reset='1')then
       temp<="00000000";
     else if(clk_in 'event and clk_in='1')then
         if(data_in='0')then
          temp<="00000000";
         else
          temp<=temp+1;
         end if;
      end  if;
    end if;
    end process;
    couter<=temp;
 end a;

          
     

⌨️ 快捷键说明

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