📄 clk_divider.vhd
字号:
library ieee;
use ieee.std_logic_1164.all;
entity clk_divider is
port
(
clk : IN std_logic;
oneus_plus : INOUT std_logic
);
end entity;
architecture structural of clk_divider is
signal counter : integer range 0 to 16;
begin
process ( clk )
begin
if rising_edge(clk) then
counter <= counter + 1;
if (counter mod 16) = 0 then
oneus_plus <= not oneus_plus;
end if;
end if;
end process;
end architecture;
PACKAGE TIMER_PKG IS
COMPONENT clk_divider
END COMPONENT;
END TIMER_PKG;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -