📄 时钟控制.txt
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity aa is
port(clk,reset:in std_logic;
load,sel:out std_logic);
end aa;
architecture B of aa is
begin
process(clk,reset)
variable count:std_logic_vector(4 downto 0);
begin
if clk'event and clk='1'then
if reset='1' then
count:="000000";
elsif count=31 then
count:="000000";
else
count:=count+1;
end if;
if count=16 then
load<='1';
else
load<='0';
end if;
if count>=0 and count<16 then
sel<='0';
else
sel<='1';
end if;
end if;
end process;
end B;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -