1843.EDA综合设计性实验报告交通灯控制器

上传人:工**** 文档编号:470261510 上传时间:2023-07-26 格式:DOC 页数:14 大小:806.50KB
返回 下载 相关 举报
1843.EDA综合设计性实验报告交通灯控制器_第1页
第1页 / 共14页
1843.EDA综合设计性实验报告交通灯控制器_第2页
第2页 / 共14页
1843.EDA综合设计性实验报告交通灯控制器_第3页
第3页 / 共14页
1843.EDA综合设计性实验报告交通灯控制器_第4页
第4页 / 共14页
1843.EDA综合设计性实验报告交通灯控制器_第5页
第5页 / 共14页
点击查看更多>>
资源描述

《1843.EDA综合设计性实验报告交通灯控制器》由会员分享,可在线阅读,更多相关《1843.EDA综合设计性实验报告交通灯控制器(14页珍藏版)》请在金锄头文库上搜索。

1、EDA综合设计性实验报告 交通灯设计 姓 名: 班 级: 电信 学 号: 指导老师: 日期: 2007.12 大学工程学院目 录1 实验目的22 实验要求33 程序编写54 程序调试及分析105 讨论及进一步研究建议126 综合设计性实验心得13参考文献141实验目的1、掌握较复杂逻辑的设计、调试。2、掌握数字电路模块层次设计。3、掌握功能分割的方法。4、熟悉交通灯的工作原理。2.实验要求1、正常控制正常控制时交通信号灯的时序如图4.1所示。为了使学生对控制要求有一个清晰的思路,同时也为了描述的方便,先分析一个方向上交通灯的变化情况。当启动开关接通时,信号灯开始工作。先东西方向绿灯亮(此时南北

2、方向红灯亮。但右转弯绿灯亮),允许通行30S,左右转向均红灯亮。30S后,东西方向绿灯灭而黄灯亮2S,同时右转弯的黄灯也亮2S,然后东西方向红灯亮,同时右转弯的绿灯亮(右转弯的红灯黄灯同时灭)。即此时东西方向仅允许右转弯。55S后,东西方向左转弯黄灯亮2S,接着也允许左转弯(左转弯红灯、黄灯灭,同时绿灯亮)。16S后,左右转弯的绿灯同时闪三下(指示信号灯将变化)后灭。左右转弯黄灯2S后灭而红灯亮,东西方向黄灯也亮2S,然后整体便进入下一个循环。东西向人行道仅有红灯和绿灯,人行道红灯变化情况和东西向中间红灯类似。仅先于中间灯2S,人行道绿灯和中间绿灯变化也类似,区别仅在点亮的最后3S闪烁而已。综

3、合上面的分析可以看出,交通道揭示的总体思路是,先允许直向通行,后允许友转弯,然后允许左右转弯,如此反复循环。南北方向的交通灯变化与东西方向次序完全一样,只不过时间上滞后55S而已。即当东西方向允许左右转向。当起动开关断开时。所有信号灯熄灭。2、急车通行控制急车强通方向由急车强通开关控制。无急车时信号灯按正常时序控制。有急车来时,将急车强通开关闭合,不管原来信号灯的状态如何,一律强制让急车来方向的绿灯亮,直至急车通过为止。急车过后,将急车强通开关断开,信号灯的状态立即转为急车方向上的绿灯闪3次,随后按正常时序控制。急车通行信号只能响应一路方向的急车,若两个方向先后来急车,则响应先来的一方,随后再

4、响应另一方。3、分析得状态表:“1”表示亮,”0”表示灭,“( 1)”表示闪烁;0、0、0红、黄、绿;人行道0、0红、绿状态时间(S)方向中间灯人行道右转灯左转灯S00-27东西00101100100南北10010001100S127-30东西0010(1)100100南北10010001100S230-32东西01010110100南北10010001110S332-48东西10010001100南北10010001001S448-51东西10010001100南北1001000(1)00(1)S551-53东西10010001100南北10010010010S653-55东西1001000

5、1100南北11010100100S755-82东西10010001100南北00101100100S882-85东西10010001100南北0010(1)100100S985-87东西10010001110南北01010110100S1087-103东西10010001001南北10010001100S11103-106东西1001000(1)00(1)南北10010001100S12106-108东西10010010010南北10010001100S13108-110东西11010100100南北10010001100S14111-114东西00(1)10100100南北10010100

6、100S15116-119东西10010100100南北00(1)101001003.程序编写1、 打开ryg.vhd文件,并将之设为当前项目。2、 ryg.vhd的源程序:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity ryg isport( rst : in std_logic; - reset 1enable clk2 : in std_logic; - 2Hz clock rush_w : in std_logic; - the emergency car signal of

7、 the west and the east - 0 enable rush_s : in std_logic; - the emergency car signal of the south and tne north -0 enable - vector is middle(8-6) right(5-3) left(2-0) ( red yellow green ) west_east : buffer std_logic_vector(8 downto 0); -the west and east lights-which flash in the same way man_w : bu

8、ffer std_logic_vector(1 downto 0); -the west&east sideway lights south_north: buffer std_logic_vector(8 downto 0); -the south and north lights -which flash in the same way man_s : buffer std_logic_vector(1 downto 0) -the south&nouth sideway lights );end entity ryg;architecture do of ryg isTYPE count

9、_state is (s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13);signal state : count_state:=s0;signal is_normal : std_logic:=1; - normal-1signal count :integer range 0 to 120; - time countsignal clk : std_logic; - (siganl) 1Hz clock beginis_normal = rush_w and rush_s;process(clk2) -divide 2Hz to 1Hzbegini

10、f clk2event and clk2=1 thenclk=not clk;end if;end process;process(clk) -the time counter and the state changerbeginif rst=1 then count=0; elsif clkevent and clk=1 then if is_normal=1 then count =0 and count=28 then state28 and count=30 then state30 and count=32 then state32 and count=48 then state48 and count=51 then state51 and count=53 then state53 and count=55 then state55 and count=83 then state83 and count=85 then state85 and count=87 then state87 and count=103 then state103 and count=106 then state106 and count=108 then state108 and count=110 then state=s13; else state=s0;count

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 资格认证/考试 > 自考

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号