- 13
- 0
- 约8.19千字
- 约 13页
- 2017-08-21 发布于重庆
- 举报
基于vhdl语言的eda实验报告(附源码)
EDA 实验报告——多功能电子钟姓名:张红义班级:10级电科五班学号:1008101143指导老师:贾树恒电子钟包括:主控模块,计时模块,闹钟模块,辅控模块,显示模块,蜂鸣器模块,分频器模块。1.主控模块:主要功能:控制整个系统,输出现在的状态,以及按键信息。源代码:libraryieee;use ieee.std_logic_1164.all;useieee.std_logic_arith.all;useieee.std_logic_unsigned.all;entity mc isport(functionswitch,k,set,lightkey: in std_logic;chose21,setout: out std_logic;lightswitch:bufferstd_logic;modeout,kmodeout : out std_logic_vector(1 downto 0);setcs,setcm,setch,setas,setam,setah:outstd_logic);end mc;architecture work of mc issignalmode,kmode:std_logic_vector(1 downto 0);signal light,chose21buf:std_logic;signalsetcount:std_logic_vector(5 downto 0);beginprocess(functionswitch,k,set,lightkey)beginiffunctionswitchevent and functionswitch=1 thenmode=mode+1;end if;iflightkeyevent and lightkey=1 thenlightswitch=not lightswitch;end if;if mode=01 thenchose21buf=0;else chose21buf=1;end if;ifkevent and k=1 thenif mode=01 or mode=11 thenkmode=kmode+1;end if;end if;if set=1 thenif mode = 01 thenifkmode=01 then setcount=000001;elsifkmode=10 thensetcount=000010;elsifkmode=11 thensetcount=000100;elsesetcount=000000;end if;elsif mode = 11 then ifkmode=01 then setcount=001000;elsifkmode=10 thensetcount=010000;elsifkmode=11 then setcount=100000;elsesetcount=000000;end if;end if;end if;if set=0 then setcount=00000”;end if;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);end process;end work;仿真波形:2. 计时模块主要功能:记录时间,正常计时。60进制libraryieee;use ieee.std_logic_1164.all; useieee.std_logic_arith.all;useieee.std_logic_unsigned.all;entity count60 isport(clk ,clr :in std_logic;co : out std_logic; outh :out std_logic_vector(7 downto 4);outl :out std_logic_vector(3 downto 0)); end count60 ;architecture work of count60 issignal bufh:std_logic_vector(7 downto 4);signal bufl:std_logic_vector(3 downto 0);beginprocess(clk) beginifclr=0 thenbufh=0000;bufl=0000;elsif(clkevent and clk=1)thenif(bufh=0101a
您可能关注的文档
- 常用的机构观察与运动分析.doc
- 程序设计(c)作业二(有答案).doc
- 乘潮潮位的理论分布探讨.doc
- 城市广场2楼模板工程施工方案.doc
- 澄清剂及其在果汁果酒中的应用.doc
- 痴呆的鉴别诊断与中西医治疗进展.doc
- 冲洗巷道安全技术措施 2.doc
- 出口集中度及地理距离对贸易的影响.docx
- 初级钳工教案二.doc
- 初三圆的概念和性质.doc
- 2025-2026学年天津市和平区高三(上)期末数学试卷(含解析).pdf
- 2025-2026学年云南省楚雄州高三(上)期末数学试卷(含答案).pdf
- 2025-2026学年甘肃省天水市张家川实验中学高三(上)期末数学试卷(含答案).docx
- 2025-2026学年福建省厦门市松柏中学高二(上)期末数学试卷(含答案).docx
- 2025-2026学年广西钦州市高一(上)期末物理试卷(含答案).docx
- 2025-2026学年河北省邯郸市临漳县九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省石家庄二十三中七年级(上)期末历史试卷(含答案).docx
- 2025-2026学年海南省五指山市九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省唐山市玉田县九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省邢台市市区九年级(上)期末化学试卷(含答案).docx
最近下载
- 幽默卡通动漫笑点设计方法.docx VIP
- 行星式球磨机立式-FOCUCY弗卡斯.PDF VIP
- 贵州省六校联考2025届高三下学期3月高考实用性联考(四)英语试卷(含答案).docx VIP
- 颈椎病的中医护理课件.pptx VIP
- 原调正谱G小小蝴蝶la farfalletta钢琴伴奏高清打印版.pdf VIP
- 上海大学2024-2025学年第1学期《高等数学(上)》期末考试试卷(B卷)附参考答案.pdf
- 广发证券-交通银行-601328-零售转型提速,定增落地夯实资本根基.pdf
- 上海大学2024-2025学年第1学期《高等数学(上)》期末考试试卷(A卷)附参考答案.pdf
- 循环系统护理小讲课.pptx
- 建筑屋面西瓦专项施工方案(范本).doc VIP
原创力文档

文档评论(0)