- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
实验项目:4位十进制频率计的设计实验目的:掌握简易频率计的工作原理并设计。熟悉vhdl语言编程及QuartusII的使用。实验原理:根据频率的定义和频率测量的基本原理,测定信号的频率必须有一个脉宽为1秒的脉冲计数允许信号,1秒计数结束后,计数值(即所测信号频率)锁入锁存器,并为下一次测频作准备,即将计数器清零。设计方案:根据频率计的工作原理,将电路划分成控制器、计数器、锁存器和LED显示几个模块,:控制器——产生1秒脉宽的计数允许信号、锁存信号和计数器清零信号计数器——对输入信号的脉冲数进行累计锁存器——锁存测得的频率值LED显示——将频率值显示在数码管上顶层文件框图如下:各模块电路的VHDL描述:10进制计数器library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity cnt10 is port (rst,fx,ena:in std_logic; cout: out std_logic; outy :out std_logic_vector(3 downto 0));end cnt10;architecture behv of cnt10 isbegin process (rst,ena,fx) variable cqi :std_logic_vector(3 downto 0);begin if rst=1 then cqi :=(others =0); elsif fxevent and fx=1 then if ena =1 then if cqi 9 then cqi:=cqi+1;cout=0; elsif cqi=9 then cqi :=(others =0); cout=1; end if; elsif ena=0 then cqi:=(others =0); end if;end if; outy =cqi;end process;end behv;4位10进计数器library ieee;use ieee.std_logic_1164.all;entity cnt10_4 isport(fx,rst,ena:in std_logic;d:out std_logic_vector(15 downto 0));end entity;architecture one of cnt10_4 iscomponent cnt10 port (rst,fx,ena:in std_logic; cout: out std_logic; outy :out std_logic_vector(3 downto 0));end component;signal e:std_logic_vector(3 downto 0);beginu1:cnt10 port map(fx=fx,rst=rst,ena=ena,cout=e(0),outy=d(3 downto 0));u2:cnt10 port map(fx=e(0),rst=rst,ena=ena,cout=e(1),outy=d(7 downto 4));u3:cnt10 port map(fx=e(1),rst=rst,ena=ena,cout=e(2),outy=d(11 downto 8));u4:cnt10 port map(fx=e(2),rst=rst,ena=ena,cout=e(3),outy=d(15 downto 12));end architecture one;16位锁存器library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity latch4 isport(d:in std_logic_vector(15 downto 0);ena,clk:in std_logic;q:out std_logic_vector(15 downto 0));end latch4;architecture one of latch4 isbeginprocess(clk,ena,d)variable cqi:std_logic_vector(15 downto 0);beginif ena=0 then cqi:=cqi;elsif clkevent and clk=1 then cqi:=d;end if;q=cqi;end process;end one;LED控制模块library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity led_controller
您可能关注的文档
最近下载
- 河南省建设工程安全生产标准化图集.docx VIP
- 别克英朗GT说明书.docx VIP
- 洪水计算(推理公式法).xls VIP
- 初中音乐 西南师大课标版 七年级上册 走进歌乐山 《走进歌乐山》 课件.ppt VIP
- (高清版)DBJ∕T 13-278-2025 《福建省电动汽车充电基础设施建设技术标准》.pdf VIP
- 带式输送机头尾部基础荷载计算书.xls VIP
- 建筑《工程质量》首件验收制度.docx VIP
- (高清版)DB21∕T 4071-2024 沥青路面再生集料应用技术规程.pdf VIP
- 中国冰沙机行业市场现状分析及竞争格局与投资发展研究报告2024-2029版.docx
- Word操作培训ppt课件.pptx VIP
文档评论(0)