?? timedevider.vhd
字號:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity timedevider is
port(inclk:in std_logic;
outclk: out std_logic;
clear:in std_logic);
end timedevider;
architecture behav of timedevider is
--signal clock:std_logic;
signal temp:std_logic_vector(5 downto 0);
begin
process(inclk,clear)
begin
if clear='1' then
outclk<='0';
temp<="000000";
elsif(inclk'event and inclk='1') then
temp<=temp+'1';
if temp="011111" then
outclk<='1';
elsif temp="111111" then
temp<="000000";
outclk<='0';
end if;
end if;
end process;
end behav;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -