?? ctl_2.vhd
字號:
Library ieee;
Use ieee.std_logic_1164.all;
Entity ctl_2 is
Port(
clk :in std_logic; -- 作時鐘使用
P1_0 :in std_logic; -- 控制脈沖寬度
T :in std_logic_vector(19 downto 0); -- 20位中間控制信號
Q :out std_logic_vector(19 downto 0); -- 開關控制信號
NQ :out std_logic_vector(19 downto 0) -- 開關控制信號
);
End ctl_2;
Architecture behavior of ctl_2 is
signal tmp1,tmp2 :std_logic_vector(19 downto 0);
Begin
Q<=tmp1;
NQ<=tmp2;
process(clk,P1_0)
begin
if (P1_0='0') then -- 關閉輸出信號,形成脈沖
tmp1<="00000000000000000000";
tmp2<="00000000000000000000";
elsif (clk'event and clk='0') then
if (P1_0='1') then
tmp1<=T;
tmp2<=NOT T;
end if;
end if;
end process;
End behavior;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -