?? pll1.vhd
字號:
--generate the clk to collect the signal from rs232
--generate the clk 'clk16x'
--the clk also can be used to send data from rs232
library ieee ;
use ieee.std_logic_1164.all ;
use ieee.std_logic_arith.all ;
entity pll1 is
port (inclk0 : in std_logic ; --原始時鐘頻率40MHz
c0 : out std_logic --rs232采集所需頻率clk16x,rs232傳送比特位寬的'16倍'
) ;
end pll1 ;
architecture counter of pll1 is
signal number : unsigned (8 downto 0) ;
begin
process(inclk0)
begin
if inclk0'event and inclk0 = '1' then
if std_logic_vector(number) = "100000011" then --計數器實現時鐘的轉換
number <= "000000000";
c0 <= '1';
else number <= number + "000000001";
c0 <= '0';
end if;
end if;
end process;
end;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -