⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 div_50.vhd

📁 一些很好的FPGA设计实例
💻 VHD
字号:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

-- 50分频;

entity div_50 is
    Port (iclk : in  std_logic;
	       oclk : out std_logic);
end div_50;

architecture Behavioral of div_50 is

begin

process(iclk)
variable cnt : integer range 0 to 50;
begin
   if iclk'event and iclk='1' then cnt:=cnt+1;
	   if cnt<25 then oclk<='0';
		elsif cnt<50 then oclk<='1';
		else cnt:=0;oclk<='1';
		end if;
   end if;
end process;

end Behavioral;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -