div_clk_381hz.vhd
来自「这个是国外大学的项目代码」· VHDL 代码 · 共 37 行
VHD
37 行
------------------------------------------------------------------------
-- div_clk_381hz.vhd --
------------------------------------------------------------------------
-- Authors : Albert Zemba & Mihai Cucicea
------------------------------------------------------------------------
-- Software version: Xilinx ISE 7.1i
-- WebPack
------------------------------------------------------------------------
-- This source file contains the div_clk_381hz component
------------------------------------------------------------------------
-- Behavioral description
-- Divides the 50Mhz clk to 381hz
------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity div_clk_381hz is
port(clock_50Mhz:in std_logic;
clk17b:out std_logic);
end div_clk_381hz;
architecture Behavioral of div_clk_381hz is
signal clk : std_logic_vector(16 downto 0):= "00000000000000000";
begin
process (clock_50Mhz)
begin
if clock_50Mhz = '1' and clock_50Mhz'event then
clk <= clk + 1;
end if;
clk17b <= clk(16);
end process;
end Behavioral;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?