fren_cout.vhd

来自「用VHDL实现的键盘扫描程序 可以稍微修改就可使用」· VHDL 代码 · 共 36 行

VHD
36
字号
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 + =
减小字号Ctrl + -
显示快捷键?