📄 clk.vhd
字号:
library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity CLK is
port(
clk: in STD_LOGIC; -- 48MHz输入时钟
rst: in STD_LOGIC; -- 异步复位
clko: out STD_LOGIC; -- 24MHz输出时钟
rsto: out STD_LOGIC -- 复位
);
end CLK;
--------------------------------------------------------------------------------
architecture BHV of CLK is
signal div: STD_LOGIC;
begin
clko<= div;
rsto<= rst;
process(clk, rst) --2分频
begin
if rst= '1' then
div<= '0';
elsif rising_edge(clk) then
div<= not(div);
end if;
end process;
end BHV;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -