用EDA怎样写频率分频器1/2 ,1/3,1/6分频

如题所述

第1个回答  2011-07-05
我给你一个65536分频,如果你想要得到其他的分频,你可以通过改变65536来得到
library ieee;
use ieee.std_logic_arith.all;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity fenpin is
port(clk: in std_logic;
clk_div4: out std_logic);
end fenpin;

architecture art of fenpin is
signal count : std_logic_vector(15 downto 0);
begin
process(clk)
begin
if(clk'event and clk='1') then
if(count = "1111111111111111") then
count<=(others=>'0');
else
count<= count + 1;
end if;
end if;
end process;
clk_div4<= count(15);
end art;本回答被网友采纳
第2个回答  2011-07-05
东职童靴?
第3个回答  2011-07-04
计数器