基于VHDL语言的EDA实验报告(附源码).docx

基于VHDL语言的EDA实验报告(附源码).docx

ID:58584656

大小:821.06 KB

页数:13页

时间:2020-10-19

基于VHDL语言的EDA实验报告(附源码).docx_第1页
基于VHDL语言的EDA实验报告(附源码).docx_第2页
基于VHDL语言的EDA实验报告(附源码).docx_第3页
基于VHDL语言的EDA实验报告(附源码).docx_第4页
基于VHDL语言的EDA实验报告(附源码).docx_第5页
资源描述:

《基于VHDL语言的EDA实验报告(附源码).docx》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、EDA实验报告——多功能电子钟姓名:张红义班级:10级电科五班学号:指导老师:贾树恒电子钟包括:主控模块,计时模块,闹钟模块,辅控模块,显示模块,蜂鸣器模块,分频器模块。1.主控模块:主要功能:控制整个系统,输出现在的状态,以及按键信息。源代码:libraryieee;useieee.std_logic_1164.all;useieee.std_logic_arith.all;useieee.std_logic_unsigned.all;entitymcisport(functionswitch,k,set,lightkey:instd_logic;chose2

2、1,setout:outstd_logic;lightswitch:bufferstd_logic;modeout,kmodeout:outstd_logic_vector(1downto0);setcs,setcm,setch,setas,setam,setah:outstd_logic);endmc;architectureworkofmcissignalmode,kmode:std_logic_vector(1downto0);signallight,chose21buf:std_logic;signalsetcount:std_logic_vector(

3、5downto0);beginprocess(functionswitch,k,set,lightkey)beginiffunctionswitch'eventandfunctionswitch='1'thenmode<=mode+'1';endif;iflightkey'eventandlightkey='1'thenlightswitch<=notlightswitch;endif;ifmode="01"thenchose21buf<='0';elsechose21buf<='1';endif;ifk'eventandk='1'thenifmode="01"

4、ormode="11"thenkmode<=kmode+'1';endif;endif;ifset='1'thenifmode="01"thenifkmode="01"thensetcount<="";elsifkmode="10"thensetcount<="";elsifkmode="11"thensetcount<="";elsesetcount<="";endif;elsifmode="11"thenifkmode="01"thensetcount<="";elsifkmode="10"thensetcount<="";elsifkmode="11"th

5、ensetcount<="";elsesetcount<="";endif;endif;endif;ifset='0'thensetcount<="00000”;endif;setout<=set;modeout<=mode;kmodeout<=kmode;chose21<=chose21buf;setcs<=setcount(0);setcm<=setcount(1);setch<=setcount(2);setas<=setcount(3);setam<=setcount(4);setah<=setcount(5);endprocess;endwork;仿真

6、波形:2.计时模块主要功能:记录时间,正常计时。60进制libraryieee;useieee.std_logic_1164.all;useieee.std_logic_arith.all;useieee.std_logic_unsigned.all;entitycount60isport(clk,clr:instd_logic;co:outstd_logic;outh:outstd_logic_vector(7downto4);outl:outstd_logic_vector(3downto0));endcount60;architectureworkofco

7、unt60issignalbufh:std_logic_vector(7downto4);signalbufl:std_logic_vector(3downto0);beginprocess(clk)beginifclr='0'thenbufh<="0000";bufl<="0000";elsif(clk'eventandclk='1')thenif(bufh="0101"andbufl="1001")thenco<='1';bufh<="0000";bufl<="0000";elsif(bufl="1001")thenbufl<="0000";bufh<=bu

8、fh+1;elsebuf

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

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

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