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

加入VIP,免费下载
 

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

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

下载须知

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

版权提示 | 免责声明

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

EDA交通灯控制器课程设计报告书.docx

1、EDA交通灯控制器课程设计报告书交通灯控制器课程设计该交通信号控制器控制十字路甲、乙两条道路的红、黄和绿三色灯,指挥车辆和行人安全通行。 功能要求如下:1. 只有在小路上发现汽车时,高速公路上的交通灯才可能变成红灯。2. 当汽车行驶在小路上时,小路的交通灯保持为绿灯,但不能超过给定的时间。(20s)3. 高速公路灯转为绿色后,即使小路上有汽车出现,而高速公路上并无汽车,也将在给定的时间内保持绿灯。(60s)。 N N Y Y N Y N Y设计如下:1hz分频器library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigne

2、d.all;use ieee.std_logic_arith.all;entity fen_pin1 isport(clk100hz:in std_logic; clk1hz:out std_logic);end fen_pin1;architecture bhv of fen_pin1 issignal qan:std_logic_vector(3 downto 0);signal qbn:std_logic_vector(3 downto 0);signal cin:std_logic;beginprocess(clk100hz)beginif(clk100hzevent and clk1

3、00hz=1)thenif qan=1001then qan=0000;cin=1;else qan=qan+1;cin=0;end if;end if;end process;process(clk100hz,cin)beginif(clk100hzevent and clk100hz=1)thenif cin=1 thenif qbn=1001 then qbn=0000;else qbn=qbn+1;end if ;end if ;end if ;end process;process(qan,qbn)beginif (qan=1001and qbn=1001)then clk1hz=1

4、;else clk1hz=0;end if;end process;end bhv;2hz分频器library ieee;use ieee.std_logic_1164.all;entity fen_pin2 isport (clk100hz:in std_logic; clk2hz:out std_logic);end fen_pin2;architecture bhv of fen_pin2 isbeginprocess(clk100hz)variable cnt:integer range 0 to 24;variable tmp:std_logic;beginif(clk100hzev

5、ent and clk100hz=1)thenif cnt=24 thencnt:=0;tmp:=not tmp;elsecnt:=cnt+1;end if;end if;clk2hzif a=0then th:=0101; tl:=1001; a:=1; ga=1; ra=0; yaif a=0then th:=0001; tl:=1001; a:=1; ra=1; ya=0; ga=0; elseif not(th=0000and tl=0001)thenif tl=0000thentl:=1001;th:=th-1;elsetl:=tl-1;end if;elseth:=0000;tl:

6、=0000;a:=0;ra=0;gaif a=0then th:=0000; tl:=1001; a:=1; ya=1; ga=0; ra=0; elseif not(th=0000and tl=0001)thenif tl=0000thentl:=1001;th:=th-1;elsetl:=tl-1;end if;elseth:=0000;tl:=0000; ga=0; ra=0; ya=0; a:=0;state:=green;end if;end if;end case;end if;timeah=th;timealif a=0then th:=0000; tl:=0100; a:=1;

7、 yb=1; gb=0; rb=0; chuif a=0then th:=0001; tl:=1001; a:=1; gb=1; rb=0; yb=0; chuif a=0then th:=0101; tl:=0100; a:=1; rb=1; yb=0; chuif a=0then th:=0000; tl:=0100; a:=1; yb=1; gb=0; rb=0; chu=1; elseif not(th=0000and tl=0001)thenif tl=0000thentl:=1001;th:=th-1;elsetl:=tl-1;end if;elseth:=0000;tl:=000

8、0;a:=0;chu=0;state:=red;end if;end if;end case;end if;timeah=th;timeal=tl;end process;end bhv;反馈器library ieee;use ieee.std_logic_1164.all;entity smen is port( sm ,re,gr,ye:in std_logic; jinji:out std_logic);end smen;architecture se of smen isbeginprocess isbeginif(sm=1 and re=0 and gr=0 and ye=0) th

9、en jinji=1;else jinji=0;end if;end process;end se;消抖电路library ieee;use ieee.std_logic_1164.all;entity xiaodou isport(jinji,clk1hz:in std_logic; b:out std_logic);end xiaodou;architecture bhv of xiaodou issignal temp1:std_logic;beginprocess(clk1hz,jinji)variable temp2:std_logic;beginif(clk1hzevent and

10、 clk1hz=0)thentemp1=jinji;temp2:=not temp1;end if;b=temp1 and temp2 and clk1hz;end process;end bhv;状态转换library ieee;use ieee.std_logic_1164.all;entity no isport(a:in std_logic; en:out std_logic);end no;architecture no_arc of no isbeginprocess(a)variable tmp:std_logic;beginif(aevent and a=1)thentmp:=

11、not tmp;end if;enq=d2;soq=d3;soq=d0;soq=d1;soq:=0111111;when0001=q:=0000110;when0010=q:=1011011;when0011=q:=1001111;when0100=q:=1100110;when0101=q:=1101101;when0110=q:=1111101;when0111=q:=0100111;when1000=q:=1111111;when1001=q:=1101111;when others=q:=1111001;end case;q0=q(0);q1=q(1);q2=q(2);q3=q(3);q4=q(4);q5=q(5);q6=q(6);end process;end bhv;仿真图如下:Ya,ra,ga表示主干道黄红绿灯;yb,rb,gb表示乡村小路黄红绿灯。下图表示:主路绿灯60s,红灯20s,黄灯5s,即使中途来车也不发生跳转。下图说明:175s之后再无车来,则保持主路绿灯,支路红灯1200s仿真图如下;

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

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