ImageVerifierCode 换一换
格式:DOCX , 页数:15 ,大小:150.62KB ,
资源ID:11163241      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/11163241.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(EDA试验设计报告.docx)为本站会员(b****7)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

EDA试验设计报告.docx

1、EDA试验设计报告EDA试验设计报告 -之交通灯学院:电子工程学院班级:021052学号:02105123姓名:阿鹏仁一、 选题目的:交通灯作为现代十字路口对交通信号灯进行管理,在我们的出行方面起很大的作用,防止了很多交通事故的发生,是现代交通建设方面不可缺少的一部分。本次试验是基于EDA技术实现对交通灯设计,因为交通灯比较好实现,各自之间的模块分明,还能掌握在设计交通灯过程中的一些模块,使我更加深刻的理解EDA这门将软件和硬件结合起来的技术。让我对VHDL语言有了更深一步的了解,跟C语言和其他的语言比起来,VHDL语言呈现了它独特的性质,它是并行运行的一种语言。此外,通过本次试验,使我熟悉掌

2、握了用EDA技术实现某一工程的全过程,在以后的运用中,能更熟练的操作。二、 设计目标:一个十字路口交通控制系统,其东西,南北两个方向除了有红、黄、绿灯指示是否允通行外,还设有时钟,以倒计时方式显示每一路允许通行的时间,绿灯,黄灯,红灯的持续时间分别是40、5和45秒。当东西或南北两路中任一道上出现特殊情况,例如有消防车,警车要去执行任务,此时交通控制系统应可由交警手动控制立即进入特殊运行状态,即两条道上的所有车辆皆停止通行,红灯全亮,时钟停止计时,且其数字在闪烁。当特殊运行状态结束后,管理系统恢复原来的状态,继续正常运行。通过VHDL语言的编写,生成元器件,然后手动连接电路,再对整个过程进行调

3、式,如果正确的话进行波形仿真,波形符合理论上的波形的话,最后一步在把整个程序烧进板子里面,实现对交通灯的模拟。三、 实现方案:原理框图: hold=0 hold=1 hold=1 hold=1 设计流程图:四、 设计过程设计交通灯需要四个模块,分别是:分频器、倒计时计数器、控制器、7字段译码器,其对应的实体名为:devide、M45、control、seg7。将程序编写好以后,以实体名为名的文件进行保存各模块代码:devide模块:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity de

4、vide isport ( clk :in std_logic; clk_out :out std_logic );end devide;architecture arc_devide of devide is signal count: std_logic_vector(21 downto 0); begin process begin wait until clkevent and clk=1; if( count4) then count=count+1; clk_out=0; else count0); clk_out=1; end if; end process;end archit

5、ecture arc_devide; M45模块:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity m45 isport( CLK : in std_logic; EN : in std_logic; CR : in std_logic; QL,QH : out std_logic_vector(3 downto 0); OC : out std_logic );end m45;architecture behav of m45 is signal couL,couH: std_log

6、ic_vector(3 downto 0);begin process(CR,CLK,EN) begin if CR=0 then couL=0000; couH=0000; elsif clkevent and clk=1 then if EN=1 then if( couL=0 and couH=0)then couL=0100; couH=0100; elsif couL=0 then couL=1001; couH=couH-1; else couL=couL-1; end if; end if; end if; end process; process(couL,couH) begi

7、n if(couL=0 and couH=0)then OC=1; else OC=0; end if; end process; QL=couL; QH=couH;end behav; control模块:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity control is port( clk,hold: in std_logic; ared,agreen,ayellow,bred,bgreen,byellow : out std_logic);end control;archit

8、ecture behavior of control is type state_type is (s0,s1,s2,s3,s4); signal current_state,next_state : state_type; signal counter : std_logic_vector(6 downto 0); beginsynch : processbegin wait until clkevent and clk = 1; if hold=0 then counter=counter; else if counter=89 then counter=counter+1; else c

9、ounter0); end if; end if;end process; processbegin wait until clkevent and clk=1; current_state if hold=0 then next_state=s4; else if counter39 then next_state=s0; else next_state if hold=0 then next_state=s4; else if counter44 then next_state= s1; else next_state if hold=0 then next_state=s4; else

10、if counter84 then next_state= s2; else next_state if hold=0 then next_state= s4; else if counter89 then next_state=s3; else next_state if hold=0 then next_state=s4; else if counter39 then next_state=s0; elsif counter44 then next_state=s1; elsif counter84 then next_state=s2; elsif counter89 then next

11、_state ared=0; agreen=1; ayellow=0; bred=1; bgreen=0; byellow ared=0; agreen=0; ayellow=1; bred=1; bgreen=0; byellow ared=1; agreen=0; ayellow=0; bred=0; bgreen=1; byellow ared=1; agreen=0; ayellow=0; bred=0; bgreen=0; byellow ared=1; agreen=0; ayellow=0; bred=1; bgreen=0; byellowtmptmptmptmptmptmpt

12、mptmptmptmptmptmptmptmptmptmpnull; end case; end process; a=tmp(6); b=tmp(5); c=tmp(4); d=tmp(3); e=tmp(2); f=tmp(1); g=tmp(0);end arc; 顶层文件: 五、 遇到的问题和解决的方案在此次试验中遇到的问题是,实际按照书上的写好程序后,波形也仿真真确,但是烧到板子的时候没有结果。最后发现问题出在管脚没有绑定,绑定管脚之后还是没有结果,经分析,发现分频分的太小了,而且理论上的七字段译码器与实际还不一样,最后按照PPT上的改过来之后,结果仿真出来了,但交通灯只有南北方向而没有东西方向,对顶层文件扩充之后,烧到板子结果完全真确。六、 实验结果波形仿真图:七、 对该课程的意见对该课程的一点小小的意见是:希望老师上课多给我们讲一些东西,不要老是叫一些同学上去做题,这样不仅浪费时间而且对我们帮助不大。

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1