📄 cnt1000.vhd
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity cnt1000 is
port(clk,en:in std_logic;
cq:out std_logic_vector(9 downto 0));
end cnt1000;
architecture behav of cnt1000 is
signal q:std_logic_vector(9 downto 0);
begin
process(clk,en)
begin
if clk'event and clk='1' then
if en='1' then
if q="1111100111" then
q<="0000000000";
else q<=q+'1';
end if;
else q<="0000000000";
end if;
end if;
cq<=q;
end process;
end behav;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -