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

 

主站蜘蛛池模板: 久久久久免费看成人影片 | 中国在线播放精品区 | 日韩在线看片中文字幕不卡 | 一级一毛片a级毛片 | a亚洲va韩国va欧美va久久 | 亚洲av电影一区二区在线秋霞网 | 亚洲欧洲成人av每日更新 | 中文无码一区二区不卡αv 中文无码一区二区三区在线观看 | 夜夜春夜夜爽 | 国产免费叼嘿网站免费 | 老鸭窝日本 | 欧美精品一区二区蜜臀亚洲 | 黄色aaa毛片| 特级淫片国产免费高清视频 | 成年免费a级毛片免费看 | 免费视频毛片 | 边喂奶边中出的人妻 | 国产精品你懂的在线播放 | 日本免费人成视频播放 | 国产成年无码久久久久下载 | 日日摸夜夜添夜夜添影院视频 | 欧美作爱福利免费观看视频 | 日韩aⅴ人妻无码一区二区 日韩av.com | 丁香色欲久久久久久综合网 | 一级欧美视频 | 四虎8848精品永久在线观看 | 亚洲av无码1区2区久久 | 一级成人毛片免费观看 | 亚洲熟妇无码av不卡在线播放 | 亚洲欧美国产精品专区久久 | 中国女人高潮hd | 四虎 影院ww9584h | 久久不见久久见免费影院国语 | 无码熟妇人妻av在线电影 | 国产亚洲欧美精品永久 | 少妇高清精品毛片在线视频 | 自拍偷拍3 | 国内精品综合九九久久精品 | 午夜a级理论片在线播放 | www.亚洲在线 | 奇米777四色在线精品 |