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

📄 div7.vhd

📁 在quartus开发环境下
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity div7 is
port(clk:in std_logic;--------时钟
     div7:out std_logic);----输出7分频信号
end;
architecture one of div7 is
	signal cnt:std_logic_vector(2 downto 0);
	signal clk_temp:std_logic;
	constant m:integer:=6;-----控制计数器的常量,m=N-1
begin
process(clk)
begin
if clk'event and clk='1' then
	if cnt=m then
	    clk_temp<='1'; 
	    cnt<="000";
	else 
	    cnt<=cnt+1; 
	    clk_temp<='0';
	end if;
end if;
end process;
div7<=clk_temp;
end;

⌨️ 快捷键说明

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