- 1、本文档共42页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
第5章设计实例报告
process(cnt1) begin if cnt1=9 then cntout=1; else cntout=0; end if; end process; cntQ=cnt1; end a; library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity freq_t is port(clk:in std_logic; freq_en:out std_logic; cnt_clr:out std_logic; load: out std_logic ); end freq_t; architecture a of freq_t is signal div2clk:std_logic; begin process(clk) begin if clkevent and clk=1 then div2clk=not div2clk;-------------2分频 end if; end process; process(clk,div2clk) begin if clk=‘0’and div2clk=‘0’ then—产生计数器清零信号 cnt_clr=1; else cnt_clr=0; end if; end process; load= not div2clk; freq_en=div2clk; end a; library IEEE; use IEEE.std_logic_1164.all; entity dlatch24 is port(load:in std_logic; din:in std_logic_vector(23 downto 0); dout:out std_logic_vector(23 downto 0) ); end dlatch24; architecture a of dlatch24 is begin process(load,din) begin if loadevent and load=1 then dout=din; end if; end process; end a; library IEEE; use IEEE.std_logic_1164.all; entity freq24t is port(clk:in std_logic; freqin:in std_logic; result_out:out std_logic_vector(23 downto 0) ); end freq24t; architecture a of freq24t is component freq_t port(clk: in std_logic; freq_en:out std_logic; cnt_clr:out std_logic; load: out std_logic); end component; component count10 port(clk:in std_logic; clr:in std_logic; ena:in std_logic; cntq:out std_logic_vector(3 downto 0); cntout:out std_logic ); end component; component dlatch24 port(load:in std_logic; din:in std_logic_vector(23 downto 0); dout:out std_logic_vector(23 downto 0) ); end component; signal freq_en1:std_logic; signal cnt_clr1:std_logic; signal load1:std_logic; signal dlatch1:std_logic_vector(23 downto 0); signal cntout1:std_logic_vector(23 downto 0); begin u1: freq_t port map(clk=clk,
文档评论(0)