EDA考试题目和答案.doc

EDA考试题目和答案.doc

ID:55631374

大小:232.00 KB

页数:40页

时间:2020-05-21

EDA考试题目和答案.doc_第1页
EDA考试题目和答案.doc_第2页
EDA考试题目和答案.doc_第3页
EDA考试题目和答案.doc_第4页
EDA考试题目和答案.doc_第5页
资源描述:

《EDA考试题目和答案.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、设计实验与考核1、设计一个带计数使能、异步复位、带进位输出的增1六位二进制计数器,计数结果由共阴极七段数码管显示。答:libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entitycounterisport(clk,clk1,en,clr:instd_logic;ledout:outstd_logic_vector(6downto0);scanout,scanout1,co:outstd_logic);endcounter;architectureaofcounterissi

2、gnalcnt:std_logic_vector(7downto0);signalled:std_logic_vector(6downto0);signalscan:std_logic;signalhex:std_logic_vector(3downto0);beginprocess(clk)beginif(clk'eventandclk='1')thenifen='1'thenifclr='1'thencnt<=(others=>'0');elseifcnt=""thencnt<="";co<='1';elsecnt<=cnt+'1';co<='0';endif

3、;endif;endif;endif;endprocess;process(clk1)beginifclk1'eventandclk1='1'thenscan<=notscan;endif;Scanout=scan;Scanout1=notscan;endprocess;ledout<=notled;hex<=cnt(7downto4)whenscan='1'elsecnt(3downto0);withhexselectled<=""when"0001",""when"0010",""when"0011",""when"0100",""when"0101",""w

4、hen"0110",""when"0111",""when"1000",""when"1001",""when"1010",""when"1011",""when"1100",""when"1101",""when"1110",""when"1111",""whenothers;enda;1、设计一个带计数使能、同步复位、带进位输出的增1二十进制计数器,计数结果由共阴极七段数码管显示。答:libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entitycounterisport

5、(clk,clk1,en,clr:instd_logic;co,scanout:outstd_logic;ledout:outstd_logic_vector(6downto0));endcounter;architecturertlofcounterissignalcnt:std_logic_vector(7downto0);signalled:std_logic_vector(6downto0);signalscan:std_logic;signalhex:std_logic_vector(3downto0);beginprocess(clk,clr)begi

6、nifclr='1'thencnt<=(others=>'0');elsifclk'eventandclk='1'thenifen='1'thenifcnt=""thencnt<="";co<='0';elsifcnt=""then--注意此处,前面跳过了A到F的计数,所以计数到11001cnt<="";co<='1';elsecnt<=cnt+'1';co<='0';endif;endif;endif;endprocess;process(clk1)beginifclk1'eventandclk1='1'thenscan<=notscan;endif;endpr

7、ocess;ledout<=notled;scanout<=scan;hex<=cnt(7downto4)whenscan='1'elsecnt(3downto0);withhexselectled<=""when"0001",""when"0010",""when"0011",""when"0100",""when"0101",""when"0110",""when"0111",""when"1000",""when"1001",""when"0000",""whenothers;endrtl;1、设计一个带计数使能、异步复位、同步装载的可逆七位二进制计数器,计

8、数结果由共

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。