音影先锋亚洲天堂网|电影世界尽头的爱完整版播放|国产 熟女 91|高清无码免费观看欧美日韩|韩国一区二区三区黄色录像|美女亚洲加勒比在线|亚洲综合网 开心五月|7x成人在线入口|成人网站免费日韩毛片区|国产黄片?一级?二级?三级

登錄 免費注冊 首頁 | 行業(yè)黑名單 | 幫助
維庫電子市場網
技術交流 | 電路欣賞 | 工控天地 | 數字廣電 | 通信技術 | 電源技術 | 測控之家 | EMC技術 | ARM技術 | EDA技術 | PCB技術 | 嵌入式系統
驅動編程 | 集成電路 | 器件替換 | 模擬技術 | 新手園地 | 單 片 機 | DSP技術 | MCU技術 | IC 設計 | IC 產業(yè) | CAN-bus/DeviceNe

貼兩個小數分頻的程序,呵呵

作者:ISeeYou 欄目:EDA技術
貼兩個小數分頻的程序,呵呵
r
分別是我前幾天發(fā)的帖求助大家的題目的程序,總算給做出來了,大家有興趣的話幫忙改進一下^_^

1:實現241/28分頻的,我出來的是98989 98989 98989 98989 98989 989 然后依次循環(huán)
  library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity hehe1 is
PORT ( f_in:in std_logic;
       f_out: out std_logic);
end;
architecture b of hehe1 is
signal counter :integer range 0 to 42;
signal i :integer range 0 to 5;
begin
PROCESS(f_in)

begin
if (f_in'event and f_in='1') then
   

if ( (0<=counter and counter<=4) or (9<=counter and counter<=12) or (17<=counter and counter<=21) or
(26<=counter and counter<=29) or (34<=counter and counter<=38 ) ) then

f_out<='1';
else
f_out<='0';
end if;

counter<=counter+1;

if counter=25 then i<=i+1; end if;
if (counter=25 and i=5)
then  counter<=0;i<=0; end if;
if counter=42 then
    counter<=0;
  end if;

end if;


end PROCESS;
end;





2:用累加器實現241/28分頻的,要求精度在10**(-8)

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity hehe2 is
PORT ( f_in:in std_logic;
       f_out: out std_logic);
end;
architecture a of hehe2 is
constant step :integer :=249500174;
--constant step :integer :=998000699;

signal counter :std_logic_vector(30 downto 0);


begin
PROCESS(f_in)
begin
if (f_in'event and f_in='1') then

   counter<=counter+step;

end if;

if counter<2**30  then
f_out<='1';
elsif counter>=2**30 then
f_out<='0';



end if;
end PROCESS;
end;


最后再次感謝吳明詩等朋友的幫助,謝謝大家!


2樓: >>參與討論
雷風
呵呵
不錯

3樓: >>參與討論
ISeeYou
to 雷風
也謝謝你的指點啊

參與討論
昵稱:
討論內容:
 
 
相關帖子
請教:FPGA雙向IO出了問題
CPLD下載線怎么做?
DDS里的頻率控制字是怎么樣達到控制頻率的
初學verilog 怪問題1?請多指教
請教各位高手仿真問題
免費注冊為維庫電子開發(fā)網會員,參與電子工程師社區(qū)討論,點此進入


Copyright © 1998-2006 m.58mhw.cn 浙ICP證030469號