?? controller.vhd
字號(hào):
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity controller is
port(clk : in std_logic;
count_ctrl:in std_logic;
control_signal:out std_logic);
end;
architecture main of controller is
signal count: integer range 0 to 32;
signal q,p: std_logic;
begin
process(clk,count_ctrl)
begin
if falling_edge(clk) then
if count_ctrl='1' then count<=count+1;
else if count=32 then count<=0;
end if;
end if;
if (count=1 or count=4 or count=6 or count=9 or count=11 or count=14 or count=16 or count=19 or count=21 or count=24 or count=26 or count=29 or count=31) then
p<='1';
else
p<='0';
end if;
end if;
control_signal<=p;
end process;
end;
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -