免费成人看片_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

 

主站蜘蛛池模板: 三级无码在钱av无码在钱 | 亚洲中久无码永久在线观看同 | 日本真人边吃奶边做爽电影 | 天天噜噜日日噜噜久久综合网 | 国产日韩视频在线观看 | 在线麻豆精东9制片厂av影现网 | 国产色综合一区二区三区 | 久久久国产99久久国产首页 | 国产日产欧产精品精品图片 | 亚洲一级特黄特黄的大片 | 一级国产 | 亚洲一级香蕉视频 | 亚洲国产成人久久99精品 | 99热在线播放 | 色妞av永久一区二区国产av | 综合网久久 | 精品免费国产一区二区女 | 色偷偷综合网 | 99精品国产免费久久国语 | 国产精品天天操 | 亚洲欧美国产日本 | 日本理伦片和搜子同居的日子 | 尤物在线观看精品国产福利片 | 日本老熟欧美老熟妇 | 亚洲 欧美 小说 | 一级片aaa| 国产精品国产三级国产专播下 | 国产色xx群视频射精 | 午夜婷婷| a级黄色 | 成人国内精品久久久久影院 | 亚洲精品图| 公车忘穿内裤被挺进小说 | 高清影院在线欧美人色 | 精品毛片视频 | 黄色毛片免费视频 | 狠狠色丁香婷婷第六色孕妇 | 亚洲高清国产一区二区三区 | 久久久久久网址 | 国产又a又黄又潮娇喘视频 国产又粗又大又黄 | 亚洲图色网站 |