📄 fenpin.vhd
字号:
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
use IEEE.std_logic_arith.all;
entity fenpin is
port ( clk40m:in std_logic;
clk10k:out std_logic
);
end fenpin;
architecture fen of fenpin is
signal temp:std_logic;
signal cnt:integer range 0 to 39;
constant m:integer:=39;
begin
process(clk40m)
begin
if clk40m'event and clk40m='1' then
if cnt=m then
temp<=not temp;
cnt<=0;
else cnt<=cnt+1;
end if;
end if;
end process;
clk10k<=temp;
end fen;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -