clock2500.vhd
来自「暑假时参加电子设计大赛曾经用EDA开发实现液晶显示TJUCI学校名的一个小程序」· VHDL 代码 · 共 37 行
VHD
37 行
--*************************************************************************************--
--Colour Sort Machine dividing clock module V1.0/2003.12.20
--EIST Department,Nankai University
--Function f_clkout =(f_clkin/125)
--Src file:clock125.vhd
--*************************************************************************************--
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity clock2500 is
port(clkin:in std_logic;
clkout:out std_logic
);
end entity;
architecture arc of clock2500 is
begin
process(clkin)
variable count:integer range 0 to 2500;
begin
if (clkin'event and clkin='1') then
if count>=2499 then
count:=0;
else
count:=count+1;
end if;
case count is
when 0 to 1249=>clkout<='0';
when others =>clkout<='1';
end case;
end if;
end process;
end arc;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?