kcoun10.vhd

来自「Fire&password数字系统实验」· VHDL 代码 · 共 28 行

VHD
28
字号

library ieee;
use ieee.std_logic_1164.all;

entity kcoun10 is
       port(A  : in std_logic;
            B  : out std_logic);
end kcoun10;

architecture kcoun10_arc of kcoun10 is
       signal counter: std_logic;
begin
     process(A)
     variable counter1: integer range 0 to 15;
     constant md : integer := 5;
     begin
          if(A 'event and A ='1')then
             if(counter1 =md)then
                counter1:=0;
                counter <= not counter;
                B <= counter;
             end if;
             counter1 := counter1+1;
          end if;
     end process;
end kcoun10_arc;

⌨️ 快捷键说明

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