EDA专业课程设计方案报告书_第1页
EDA专业课程设计方案报告书_第2页
EDA专业课程设计方案报告书_第3页
EDA专业课程设计方案报告书_第4页
EDA专业课程设计方案报告书_第5页
已阅读5页,还剩11页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

《电子设计自动化EDA》课程设计汇报书学号:08057102班级:自动化081姓名:陈婷指导老师:刘伟目录一、设计思想 2二、设计步骤 3三、调试过程 8四、结果分析 10五、心得体会 11六、参考文件 11一、设计思想(一)、设计要求1、含有以二十四小时制时、分、秒记时、显示功效。2、含有整点报时功效,整点报时同时LED花样显示。3、含有消零,调整小时,分钟功效。4、设计精度要求为1s。(二)、系统功效描述1.、系统输入:调时、调分,清零信号,分别用按键开关SETHOUR、SETMIN、RESET控制;计数时钟信号CLK采取2HZ时钟源,扫描时钟信号CLKDSP采取32HZ时钟源或更高;2、系统输出:8位八段共阴极数码管显示输出;LED花样显示输出;3、系统功效具体描述:计时:正常工作状态下,每日按二十四小时计时制,蜂鸣器无声,逢整点报时。显示:要求采取扫描显示方法驱动8位8段数码管显示。整点报时:蜂鸣器在“51”、“53”、“55”、“57”、校时:在计时状态下,按下按键SETMIN设定分钟,按下按键SETHOUR设定小时。(三)设计思绪1、分别写出六进制、十进制、二十四进制、清零、设置时分、LED译码部分,在主体部分用元件例化语句计时,清零设置时分、LED译码,再加上扫描模块2、将六进制、十进制、二十四进制、清零、设置时分、LED译码、扫描模块分模块写在一个主中(四)系统电路结构框图二、设计步骤(一)多种进制计时立即钟控制模块程序1、6进制libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entitycounter6isport(clk,reset,set:instd_logic;ain:instd_logic_vector(3downto0);aout:outstd_logic_vector(3downto0);co:outstd_logic);endcounter6;architectureart2ofcounter6issignalcount:std_logic_vector(3downto0);beginprocess(clk)beginif(clk'eventandclk='1')thenif(reset='0')thencount<="0000";elsif(set='1')thencount<=ain;elsif(count="0101")thencount<="0000";co<='1';elsecount<=count+1;co<='0';endif;endif;endprocess;aout<=count;endart2;2、10进制libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entitycounter10isport(clk,reset,set:instd_logic;ain:std_logic_vector(3downto0);aout:outstd_logic_vector(3downto0);co:outstd_logic);endcounter10;architectureart1ofcounter10issignalcount:std_logic_vector(3downto0);beginprocess(clk)beginif(clk'eventandclk='1')thenif(reset='0')thencount<="0000";elsif(set='1')thencount<=ain;elsif(count="1001")thencount<="0000";co<='1';elsecount<=count+1;co<='0';endif;endif;endprocess;aout<=count;endart1;3、24进制ibraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entitycounter24isport(clk,reset,set:instd_logic;ainh:instd_logic_vector(3downto0);ainl:instd_logic_vector(3downto0);aout:outstd_logic_vector(7downto0));endcounter24;architectureart3ofcounter24issignalcount:std_logic_vector(7downto0);beginprocess(clk)beginif(clk'eventandclk='1')thenif(reset='0')thencount<="00000000";elsif(set='1')thencount(7downto4)<=ainh;count(3downto0)<=ainl;elsif(count(7downto4)<"0011")thenif(count(7downto4)="0010"andcount(3downto0)="0011")thencount<="00000000";elsif(count(3downto0)="1001")thencount(3downto0)<="0000";count(7downto4)<=count(7downto4)+1;elsecount(3downto0)<=count(3downto0)+1;endif;endif;endif;--endif;endprocess;aout<=count;endart3;(二)系统整体程序libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entityclockisport(clk,b1,clks:instd_logic;reset:instd_logic;setmin,sethour:instd_logic;minutell,minutehh,hourll,hourhh,b2:instd_logic_vector(3downto0);secondl,secondh:outstd_logic_vector(3downto0);--second0,second2:outstd_logic_vector(6downto0);minutel,minuteh:outstd_logic_vector(3downto0);--minute0,minute2:outstd_logic_vector(6downto0);hourl,hourh:outstd_logic_vector(3downto0);--hour0,hour2,dout:outstd_logic_vector(6downto0);dout:outstd_logic_vector(6downto0);s:outstd_logic_vector(2downto0);singing,light:outstd_logic);endclock;architectureartofclockiscomponentcounter10isport(clk,reset,set:instd_logic;ain:instd_logic_vector(3downto0);aout:outstd_logic_vector(3downto0);co:outstd_logic);endcomponent;componentcounter6isport(clk,reset,set:instd_logic;ain:instd_logic_vector(3downto0);aout:outstd_logic_vector(3downto0);co:outstd_logic);endcomponent;componentcounter24isport(clk,reset,set:instd_logic;ainh,ainl:std_logic_vector(3downto0);aout:outstd_logic_vector(7downto0));endcomponent;componentled7isport(ain:instd_logic_vector(3downto0);aout:outstd_logic_vector(6downto0));endcomponent;signalcs0,cs1,cm0,cm1:std_logic;signals0,s1,m0,m1,h0,h1,cout:std_logic_vector(3downto0);signalh:std_logic_vector(7downto0);signalcount:std_logic_vector(2downto0);beginh0<=h(3downto0);h1<=h(7downto4);u1:counter10portmap(clk=>clk,reset=>reset,set=>b1,ain=>b2,aout=>s0,co=>cs0);u2:counter6portmap(clk=>cs0,reset=>reset,set=>b1,ain=>b2,aout=>s1,co=>cs1);u3:counter10portmap(clk=>cs1,reset=>reset,set=>setmin,ain=>minutell,aout=>m0,co=>cm0);u4:counter6portmap(clk=>cm0,reset=>reset,set=>setmin,ain=>minutehh,aout=>m1,co=>cm1);u5:counter24portmap(clk=>cm1,reset=>reset,set=>sethour,ainl=>hourll,ainh=>hourhh,aout=>h);u6:led7portmap(ain=>cout,aout=>dout);secondl<=s0;secondh<=s1;minutel<=m0;minuteh<=m1;hourl<=h0;hourh<=h1;process(m1,m0,s1,s0)beginif(m1="0101"andm0="1001"ands1="0101"ands0="1001")thensinging<='1';light<='1';elsesinging<='0';light<='0';endif;endprocess;process(clks)beginif(clks'eventandclks='1')thenif(count="101")thencount<="000";elsecount<=count+1;endif;s<=count;CASEcountIS when"000"=>cout<=s0;when"001"=>cout<=s1;when"010"=>cout<=m0;s<="010";when"011"=>cout<=m1;when"100"=>cout<=h0;when"101"=>cout<=h1;whenothers=>cout<="0000";endcase;endif;endprocess;endart;三、调试过程(一)仿真波形1、6进制程序仿真波形2、10进制程仿真波形3、24进制程序仿真波形4、系统程序仿真波形(二)分析问题1:u6:led7portmap(ain=>secondl,aout=>second0);u7:led7portmap(ain=>secondh,aout=>second1);u8:led7portmap(ain=>minutel,aout=>minute0);u9:led7portmap(ain=>minuteh,aout=>minute1);u10:led7portmap(ain=>hourl,aout=>hour0);u11:led7portmap(ain=>hourh,aout=>hour1);问题分析:元件例化是并行语句,按此段代码LDE并行显示,每一个数码管全部需要八个端口,这么就需要八排插口,而试验箱只有一排端口。处理措施:采取扫描显示方法,修改程序为:u6:led7portmap(ain=>cout,aout=>dout);问题2:u1:counter10portmap(clk=>clk,reset=>reset,aout=>s0,co=>cs0);问题分析:此元件例化中有set,ain两个端口没有用到处理措施:设置两个输入端口使set和ain为无效信号,设置b1,b2,使set=>b1,ain=>b2,b1,b2类型必需分别和set和ain相同,在连线时可用拨码开关将b1,b2置成对应状态。问题3:对变量多重赋值处理措施:设置中间信号问题4:元件例化模块采取名称映射时两个变量类型不相同处理措施:名称映射两变量类型应相同四、结果分析1、10进制计数器分析:当reset=‘0‘时,aout<=’0000’当set=‘1‘时,aout<=ain(0011);当reset=‘1‘且set=‘0‘时,开始计数从“0000”到“1001”,当aout=“1001”时aout被置零,且进位Co<=2、6进制计数器分析:当reset=‘0‘时,aout<=’0000’当set=‘1‘时,aout<=ain(0101);当reset=‘1‘

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论