divid_200.vhd
上传用户:hbxtsdjs
上传日期:2022-07-03
资源大小:753k
文件大小:1k
- ----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 10:10:07 03/15/2010
-- Design Name:
-- Module Name: divid_200 - 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 divid_200 is
Port ( clk : in STD_LOGIC;
clk_200Hz : out STD_LOGIC);
end divid_200;
architecture Behavioral of divid_200 is
- signal cnt:integer range 0 to 49999;
signal clk_tmp:std_logic;
begin
- process(clk)
begin
if(clk'event and clk='1')then
if cnt=49999 then
cnt<=0;
clk_tmp<=not clk_tmp; --half period the clk_tmp change
else
cnt<=cnt+1;
end if;
end if;
end process;
clk_200Hz<=clk_tmp;
end Behavioral;