论文首页哲学论文经济论文法学论文教育论文文学论文历史论文理学论文工学论文医学论文管理论文艺术论文 |
end process P2;
end;
由于闸门采用的是0.5Hz的方波,因此熓涑鍪值即为频率值。
(2) 分频模块
通过此模块可对频率计得到的频率进行分频,也可在异或后再分频得到频率为0.5Hz的矩形波。
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity fen is
port(qin:in std_logic vector(19 downto 0);--连接频率计输出的频率值
qout:out std_logic);
end;
architecture data of fen is
signal temp:std_logic_vector(19 downto 0);
signal a:std_logic;
begin
process(temp)
begin
if temp<qin then
temp<=temp+1;
else
temp<=“00000000000000000000”;
a<=not a;
end if;
qout<=a; --进行2f倍分频
end process;
end;