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

📄 mc8051_clockdiv.vhd

📁 8051VHDL原代码
💻 VHD
字号:
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 mc8051_clockdiv is
    Port ( clk : in  STD_LOGIC;
           clkdiv : out  STD_LOGIC);
end mc8051_clockdiv;

architecture Behavioral of mc8051_clockdiv is
signal divcnt:std_logic_vector(3 downto 0);
begin
process(clk)
begin
   if rising_edge(clk) then
	   divcnt<=divcnt+1;
	end if;
end process;
clkdiv<=divcnt(3);
end Behavioral;

⌨️ 快捷键说明

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