免费成人看片_91理论片_9191成人_992tv在线成人免费观看_国产123区在线观看_久久精品国产免费

首页 新闻 > 科技 > 正文

用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 创投网 - www.vdsvyglz.cn All rights reserved
联系我们:33 92 [email protected]
豫ICP备2020035879号-12

 

主站蜘蛛池模板: 一级毛片ab片高清毛片 | 成人欧美一区二区三区视频 | 亚洲黄网免费 | 亚洲av无码成h人动漫网站 | 欧洲1区二区三区二页 | 妓院一钑片免看黄大片 | 国产成人精品午夜福利 | 一级毛片一级毛片一级毛片 | aa在线免费观看 | a级片免费在线播放 | 国产精品久久久视频 | 国精产品一二三区传媒公司 | 中国一级特黄真人毛片 | 日韩精品欧美在线 | 国产乱肥老妇精品视频 | 久操视频在线观看 | 亚洲欧美日韩高清一区二区三区 | 亚洲av第一页国产精品 | 欧美视频一区二区在线观看 | 亚洲综合在线观看视频 | 成年视频网站免费观看 | 69成人做爰免费视频 | 又大又硬又爽免费视频 | 免费日本毛片 | 国产欧美日韩亚洲精品区2345 | 亚洲av无码成人精品区天堂 | 国产伦精品一区二区 | 国产成 人 综合 亚洲绿色 | 国产农村一国产农村无码毛片 | 亚洲色精品三区二区一区 | 国产日韩av在线播放 | 国内精品久久久久久久999下 | 九九久久精品无码专区 | 亚洲私密视频 | 香港三日本三级少妇三级99 | 国产福利网 | 免费观看又色又爽又黄的韩国 | 天天综合亚洲国产色 | 国产jk精品白丝av在线观看 | 狠狠精品久久久无码中文字幕 | 亚洲欧美日韩高清 |