?? cntm24v.vhd
字號(hào):
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_unsigned.ALL;
--------------------
ENTITY cntm24v IS
PORT(en: IN std_logic;
clr:in std_logic;
clk:in std_logic;
cont:out std_logic;
qh:buffer std_logic_vector(3 downto 0);
ql: buffer std_logic_vector(3 downto 0));
END ;
-----------------------------
ARCHITECTURE beh OF cntm24v IS
BEGIN
cont<='1'when (qh="0010"and ql="0011"and en='1')else '0';
PROCESS(CLK,clr)
BEGIN
IF(clr='0')THEN
qh<="0000";
ql<="0000";
elsif (clk'event and clk='1')then
IF(en='1')THEN
if(ql=3)then
ql<="0000";
if(qh=2)then
qh<="0000";
else
qh<=qh+1;
end if;
else
ql<=ql+1;
end if;
end if;
end if;
end process;
end beh;
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -