基于CPLD的交通灯设计作者姓名:***(270010****)***(270010****)***(270010****)摘要现代EDA技术是用于电子产品设计中比较先进的技术,可以代替设计者完成电子系统设计中的大部分工作,而且可以直接从程序中修改错误及系统功能而不需要硬件电路的支持,既缩短了研发周期,又大大节约了成本,受到了电子工程师的青睐。在设计中采用EDA技术,通过广泛应用的VHDL硬件电路描述语言,实现交通灯系统控制器的设计,利用MAXPLUSⅡ集成开发环境进行综合、仿真,并下载到CPLD可编程逻辑器件中,完成系统的控制任务。以下就是运用基于Altera公司的FLEX系列的CPLD设计的交通灯:其中红灯亮,表示该条路禁止通行;黄灯亮表示停车;绿灯亮表示允许通行。关键词:交通灯VHDLCPLD1AbstractModernEDAtechnologyisusedinelectronicproductdesign,moreadvancedtechnology,canreplacethedesignofelectronicsystemsdesignerstocompletemostofthework,andcanbemodifieddirectlyfromtheprogramerrorsandsystemfunctionswithouttheneedforhardwaresupport,notonlyshortenthedevelopmentcycle,butalsosignificantcostsavingsbytheelectronicengineersofallages.EDAtechnologyusedinthedesign,widelyusedbyVHDLhardwaredescriptionlanguagetorealizethedesignoftrafficsignalsystemcontroller,usingMAXPLUSⅡcomprehensiveintegrateddevelopmentenvironment,simulation,anddownloadtotheCPLDprogrammablelogicdevices,completesystemcontroltasks.ThefollowingistheuseofAltera'sFLEXseriesbasedonCPLDdesignoftrafficlights:oneredlight,indicatingthattheroadisclosedtotraffic;yellowlightthatparking;greenlightthatallowedtopass.Keywords:trafficlightsVHDLCPLD目录引言...........................................................................................................................................-4-第一章任务分析......................................................................................................................-4-一﹑设计任务......................................................................................................................-4-二、整体构思......................................................................................................................-4-第二章硬件电路设计..............................................................................................................-5-一、分频器..........................................................................................................................-5-二、控制器设计..................................................................................................................-6-2三、将十进制数字分成个位和十位..................................................................................-6-四、十进制-BCD码转换器设计........................................................................................-7-五、数据选择器设计..........................................................................................................-7-六、数码管译码器设计......................................................................................................-8-七、下图为交通灯控制器的顶层文件连接图..................................................................-8-第三章程序设计........................................................................................................................-9-一、分频器的设计..............................................................................................................-9-二、控制设计..............................................................................