发布网友 发布时间:2023-12-21 18:41
共1个回答
热心网友 时间:2024-07-13 09:24
5hz 周期是 48hz的4800000倍,除以2是,转换成十六进制x493E00
程序如下:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity fp33 is
port(clk: in std_logic;
fpclk: out std_logic);
end fp33;
architecture arc of fp33 is
signal count: std_logic_vector(23 downto 0);
begin
process(clk)
variable clk0: std_logic;
begin
if clk'event and clk='1' then
if count=X"493E00" then
clk0:=not clk0;
count<=X"000000";
else
count<=count+1;
end if;
end if;
fpclk<=clk0;
end process;
end arc;
不过这个时间是相当的长啊!