



全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、八进制计数器的VHDL设计library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity counter8 is port(clk:in std_logic; counter:out std_logic_vector(2 downto 0);end entity counter8;architecture bhv of counter8 is signal counter1:std_logic_vector(2 downto 0); begin process (clk) begin if clkevent and clk=1 then if counter1=111 then counter1=000; else counter1=counter1 +1; end if; end if; end process; countersegoutsegoutsegoutsegoutsegoutsegoutsegoutsegoutsegoutsegoutsegoutsegoutsegoutsegoutsegoutsegoutsegout=00000000; end case; end process;end architecture bhv;3、分频library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity fenpin is generic(N:integer); port(clk:in std_logic; q:buffer std_logic);end entity fenpin;architecture bhv of fenpin is begin process (clk) variable a1:integer:=N-1 ; begin if rising_edge(clk) then if a1=N-1 then a1 :=0;q32000) port map(clk,clk1); M2 :counter8 port map(clk1,counter); M3 :decl7s port map(bcdin,segout); end bhv; 2 实验中数码管上将轮流产生0-F,间隔时间为1s的顶层文件。library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;entity shumaguan is port (clk:in std_logic; bcdin:buffer std_logic_vector(3 downto 0); segout:out std_logic_vector(7 downto 0); counter:out std_logic_vector(2 downto 0) );end shumaguan;architecture bhv of shumaguan is component fenpin generic(N:integer); port(clk:in std_logic; q:buffer std_logic); end component ; component decl7s port(bcdin:in std_logic_vector(3 downto 0); segout:out std_logic_vector(7 downto 0) ); end component ; component counter8 port(clk:in std_logic; counter:out std_logic_vector(2 downto 0) ); end component ; signal clk1: std_logic; signal clk2: std_logic; begin M1 :fenpin generic map(N=32000) port map(clk,clk1); M2 :fenpin generic map(N=20000000) port map(clk,clk2); M3 :counter8 port map(clk1,counter); M4 :decl7s port map(bcdin,segout); process(clk,clk2) begin if rising_
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 多措并举促进教育培训提质增效的策略及实施路径
- 探索河流水质自然恢复路径的策略及实施路径
- 复杂地形区域土石方施工方案
- BIM与AR技术在建筑施工可视化中的应用研究
- 新能源企业2025年国际化能源互联网平台建设报告
- 2025年车工评级考试试题及答案
- 品牌媒体活动策划方案范文
- 北辰区微信营销方案
- 2025年海洋能发电与海岛地区新能源产业协同发展模式研究报告
- 辽宁财务咨询方案
- 养老服务合作协议
- 工行授权委托书模板
- 新人教版高一语文必修1第一单元测试试卷及答案
- 《埃菲尔铁塔唯美》课件
- 《电化学储能电站消防验收规范》
- 道路交通安全培训课件
- 2022年海南省中考语文试卷
- 大学英语四级考试阅读理解真题及答案详解(全套)
- 干细胞治疗滑膜炎的有效性
- 工程预决算书
- 丰顺县乡镇集中式饮用水水源地基础状况调查和风险评估报告
评论
0/150
提交评论