?? 53_counter.vhd
字號:
library IEEE;
use IEEE.std_logic_1164.all;
package mycntpkg is
component count port(clk,rst : in std_logic;
cnt : inout std_logic_vector(2 downto 0));
end component;
end mycntpkg;
library IEEE;
use IEEE.std_logic_1164.all;
entity count is port(clk,rst : in std_logic;
cnt : inout std_logic_vector(2 downto 0));
end count;
--use work.std_arith.all;
library IEEE;
use IEEE.std_logic_arith.all;
--use work.all;
architecture archcount of count is
begin
counter:process(clk,rst)
begin
if rst = '1' then
cnt <= (others =>'0');
elsif (clk'event and clk = '1') then
cnt <= cnt +1;
end if;
end process;
end archcount;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -