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

📄 clockdiv.vhd

📁 本程序以XILINX公司的ISE8.2为开发平台
💻 VHD
字号:
------------------------------------------------------------------------------------ Company: -- Engineer: -- -- Create Date:    10:46:09 06/13/2007 -- Design Name: -- Module Name:    ClockDiv - Behavioral -- Project Name: -- Target Devices: -- Tool versions: -- Description: ---- Dependencies: ---- Revision: -- Revision 0.01 - File Created-- Additional Comments: ------------------------------------------------------------------------------------library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;---- Uncomment the following library declaration if instantiating---- any Xilinx primitives in this code.--library UNISIM;--use UNISIM.VComponents.all;entity ClockDiv is    Port ( reset : in  STD_LOGIC;           clk : in  STD_LOGIC;           clkdiv : out  STD_LOGIC);end ClockDiv;architecture Behavioral of ClockDiv issignal cnt : std_logic_vector(3 downto 0);beginprocess(clk,reset)  begin 		if reset ='1' then			cnt<=(OTHERS =>'0');		else           IF (clk'event AND clk='1' ) THEN 				  cnt <= cnt +1;                IF (cnt="1001" ) THEN                   cnt <= (OTHERS =>'0'); 				     END IF; 				  END IF ; 			 end if; END PROCESS; process(clk)   begin     if(clk'event and clk='1') then         if (cnt="1001") then           clkdiv <='1';         else          clkdiv <='0';        end if;     end if;  end process;	end Behavioral;

⌨️ 快捷键说明

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