小明永久免费大陆在线观看-小明永久免费视频-小明永久视频免费播放-小嫩妇好紧好爽再快视频-小嫩嫩12欧美-小日本xxx

首頁 新聞 > 科技 > 正文

用VHDL設計的任意頻率分頻器

Sometimes I need to generate a clock at a lower frequency than the main clock driving the FPGA. If the ratio of the frequencies is a power of 2, the logic is easy. If the ratio is an integer N, then a divide-by-N counter is only a little harder. But if the ratio isn"t an integer, a little (and I mean a little) math is required. Note that the new clock will have lots of jitter: there"s no escaping that. But it will have no drift, and for some applications that"s what counts. If you have a clock A at frequency a, and want to make a clock B at some lower frequency b (that is, b a), then something like: d = 0; forever { Wait for clock A. if (d 1) { d += (b/a); } else { d += (b/a) - 1; /* getting here means tick for clock B */ } } but comparison against zero is easier, so subtract 1 from d: d = 0; forever { Wait for clock A. if (d 0) { d += (b/a); } else { d += (b/a) - 1; /* getting here means tick for clock B */ } } want an integer representation, so multiply everything by a: d = 0; forever { Wait for clock A. if (d 0) { d += b; } else { d += b - a; /* getting here means tick for clock B */ } } For example. I just bought a bargain batch of 14.1523MHz oscillators from BG but I need to generate a 24Hz clock. So a=14152300 and b=24: d = 0; forever { Wait for clock A. if (d 0) { d += 24; } else { d += 24 - 14152300; /* getting here means tick for clock B */ } } For a hardware implementation I need to know how many bits are needed for d: here it"s 24 bits to hold the largest value (-14152300) plus one more bit for the sign. In VHDL this looks like: signal d, dInc, dN : std_logic_vector(24 downto 0); process (d) begin if (d(24) = "1") then dInc = 0000000000000000000011000; -- (24) else dInc = 1001010000000110110101100; -- (24 - 14152300) end if; end process; dN = d + dInc; process begin wait until A"event and A = "1"; d = dN; -- clock B tick whenever d(24) is zero end process;

關鍵詞: VHDL任意頻率分頻器

最近更新

關于本站 管理團隊 版權申明 網站地圖 聯系合作 招聘信息

Copyright © 2005-2018 創投網 - m.zhigu.net.cn All rights reserved
聯系我們:33 92 [email protected]
豫ICP備2020035879號-12

 

麻豆精品国产精华精华液好用吗 | 欧美人与动牲交a精品 | 丰满的少妇xxxxx青青青 | 成人永久免费福利视频网站 | 免费人成网站在线观看欧美 | 91人人爱| 国产精品无码av在线播放 | 2021国产精品视频网站 | 中文字幕精品无码一区二区三区 | 三男一女吃奶添下面 | 国产精品久久久久久亚洲影视 | 国产亚洲精品久久久久5区 精品无码人妻一区二区三区不卡 | 男女18禁啪啪无遮挡激烈网站 | 日韩精品无码一区二区三区四区 | 亚洲av日韩av不卡在线观看 | 欧美黑人粗大xxxxbbbb | 亚洲午夜成人精品无码色欲 | 五十路丰满中年熟女中出 | 久久人人爽人人爽人人片av麻烦 | 精品成人免费播放国产片 | 亚洲码国产精品高潮在线 | 国产精品无码一区二区在线 | 国产精品无码一区二区三区 | a级国产乱理论片在线观看 国产精品手机免费 | 国模冰莲极品自慰人体 | 极品少妇被猛的白浆直喷白浆 | 国产精品无码无卡无需播放器 | 天天夜碰日日摸日日澡性色av | 亚洲 欧美 激情 小说 另类 | 亚洲国产欧美国产综合一区 | 国产亚洲精品无码成人 | 国产精品无码久久久久成人影院 | 国产亚洲情侣一区二区无 | 国产一区二区内射最近更新 | 91精品国产综合久久欧美 | 色狠狠一区二区三区香蕉 | 久久久久无码精品亚洲日韩 | 久久久久亚洲精品无码网址色欲 | 亚洲色成人网站www永久四虎 | 亚洲乱妇老熟女爽到高潮的片 | 亚洲av无码成人黄网站在线观看 |