📄 counter100.vhd
字号:
Library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
entity counter100 is
port( En : in std_logic;
inclk: in std_logic;
fpc : in std_logic;
count: out std_logic;
Low : out std_logic_vector(3 downto 0);
High : out std_logic_vector(3 downto 0)
);
end counter100;
architecture counter100_arch of counter100 is
signal ma,mb :std_logic_vector(3 downto 0);
begin
process(inclk,fpc,En)
begin
if fpc'event and fpc='1' then
if En='1' then
if ma=9 then
ma<="0000";
if mb=9 then
mb<="0000";
else
mb<=mb+1;
end if;
else
ma<=ma+1;
end if;
else
ma<="0000";
mb<="0000";
end if;
end if;
Low<=ma;
High<=mb;
end process;
end counter100_arch;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -