免费成人看片_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 创投网 - m.vdsvyglz.cn All rights reserved
联系我们:33 92 950@qq.com
豫ICP备2020035879号-12

 

主站蜘蛛池模板: 欧美成人爽毛片在线视频 | 久久99久久精品免费思思6 | 久久精品国产久精国产爱 | 特级毛片a级毛片免费播放 特级毛片a级毛片免费观看网站 | 免费看日韩欧美一级毛片 | 四虎网页| 91极品视频 | 中文字幕人妻中文 | 国产无吗一区二区三区在线欢 | 国产亚洲精品资源一区 | 熟妇人妻va精品中文字幕 | 国产亚洲婷婷香蕉久久精品 | 99久久国产综合精品女图图等你 | 欧洲综合色 | 黄色aaaa | 国产欧美一区二区精品仙草咪 | 亚洲 欧洲 另类 综合 自拍 | 免费观看www视频 | 日韩在线不卡免费视频一区 | 欧美日韩高清不卡一区二区三区 | 久久国产精品自由自在 | 性色欲网站人妻丰满中文久久不卡 | 久久一区二区精品综合 | 亚州不卡 | 亚洲国产精品无码久久一线 | 四虎成人精品无码永久在线 | 99视频在线看观免费 | 亚洲国产精品无码久久sm | 波多野结衣av手机在线观看 | 亚洲va欧美va国产综合久久 | 成人窝窝午夜看片 | 亚洲一区二区视频 | 久久99精品国产麻豆 | 亚洲欧洲∨国产一区二区三区 | 国产激情无码视频在线播放性色 | 日韩中文字幕精品久久 | 中文字幕av日韩精品一区二区 | 色综合99久久久无码国产精品 | 色在线免费观看 | 免费成年人视频在线观看 | 曰韩无码二三区中文字幕 |