偶数倍频.txt

来自「VHDL实现倍频--偶数倍 分频电路 --分频倍数=2(n+1)」· 文本 代码 · 共 37 行

TXT
37
字号
--偶数倍 分频电路
--分频倍数=2(n+1)

LIBRARY ieee;
USE ieee.std_logic_1164.all; 
USE ieee.std_logic_arith.all; 
USE ieee.std_logic_unsigned.all; 

entity test1 is
	port
	(
		clkin:in std_logic;
		clkout:out std_logic
	);
end test1;

architecture test_a of test1 is
constant n: integer:=3;---------------------
signal count: integer range 0 to n;
signal clk: std_logic;
begin
	process(clkin)
	begin
	if rising_edge(clkin)then
		if(count=n)then
			count<=0;
			clk<=not clk; 
		else
			count<=count+1;
		end if;
	end if;	
	end process;
	clkout<=clk;
end;

⌨️ 快捷键说明

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