📄 count24.vhd
字号:
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
USE IEEE.STD_LOGIC_ARITH.aLL;
ENTITY count24 is
PORT(carry:in std_logic;
rst:in std_logic;
times:out integer range 0 to 23;
full:out std_logic);
END count24;
ARCHITECTURE arch OF count24 IS
signal time :integer range 0 to 23;
begin
process (rst,carry)
begin
if rst='1' then time <= 0;full <= '0';
else if rising_edge(carry)then
if time= 23 then time<=0;
full<='1';
else time<=time+1;
full<='0';
end if;
end if;
end process;
times<=time;
END arch;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -