基于FPGA的出租车计价器的设计摘要出租车计价器是乘客与司机双方的交易准则。具有良好性能的计价器无论是对广大出租车司机朋友还是乘客来说都是很必要的。现在各大中城市出租车行业都已普及自动计价器,而部分小城市尚未普及,但随着城市建设日益加快,象征着城市面貌的出租车行业也将加速发展,所以计价器的普及也是毫无疑问的。本论文阐述了EDA的发展及其优势、FPGA的发展趋势及结构特点和VHDL语言的优点及语法结构,并分析了出租车计价器各模块的功能要求、基本原理以及实现方法。本论文的设计采用VHDL硬件描述语言进行编程,基于QuartusII软件平台进行编译和仿真。论文介绍了采用FPGA芯片设计出租车计价器的方法,阐述了该计价器的主要组成单元:车轮大小选择模块、计程模块、计时模块及计费模块、数据分配模块、分频模块、译码模块的设计方法,同时给出了详细的仿真波形,实现了出租车基本计费功能,还能模拟汽车启动,停止,暂停等状态,同时提高了计费系统的可靠性、通用性。本设计在FPGA试验箱上运行良好,实现了计费器的各项功能。关键字FPGA,VHDL,QuartusII,出租车计价器Subject:ThedesignofthetaximeterbasedonFPGASpecialty:MicroeletronicsScienceandEngineeringName:DanShen(Signature)___________Instructor:GailiYue(Signature)___________ABSTRACTTaximeteristheruleofpassengeranddriver.Haveagoodperformanceofthemeterforourtaxidriverorpassengerisverynecessary.Nowtheautomatictaximeterhaspopularized,andsomesmallcityhasnotbeenpopular,butwiththequickeningofcityconstruction,thesymbolofthecitywillacceleratedevelopmentofthetaxiindustry.ThisarticleelaboratestheconceptanddevelopmentofEDA,thedevelopmenttrendandstructureoftheFPGA,andexplainstheadvantagesandgrammarstructureofVHDL,meanwhile,analysedthefunctionrequest,thebasicprincipleaswellasthemethodofaccomplishmentofeachparts.Thissystem'sdesignprogrammesintheVHDL,compiledandemulatedbasingonQuartusIIplatformofAlteraconsistsoffourmodules,thatisspeed,mileage,timingandbillingmodule.ThispaperintroduceonemethodthatcanuseachipofFPGAtodesigntaximeter,whichconsistsoffourmodules,thatisspeed,mileage,timingandbillingmodule,andthen,describethedesignofeachmoduleandgiveoutthesimulation.Thistaximetercanbeself-chargingaccordingtomileage,whichalsocansimulatethestateofspeed,suchasstart,stop,andpause,atthesametime,itsreliabilityandcommonalityalsocanbeimproved.ThisdesignFPGAtestboxonrunningwell,realizethedifferentfunctionsofthemessageaccountingdevice.KEYWORDSFPGA,VHDL,QuartusII,Thetaximeter目录第1章绪论................................................................11.1课题研究背景及目的...................................................11.2课题研究现状.........................................................21.3课题研究方法.........................................................3第2章设计相关工具介绍....................................................42.1EDA介绍..............................................................42.1.1EDA的发展........................................................42.1.2EDA的优势........................................................52.2FPGA介绍.............................................................52.2.1FPGA的发展趋势...................................................62.2.2FPGA结构及其特点.................................................72.3VHDL介绍.............................................................72.3.1VHDL简介.........................................................72.3.2VHDL代码结构.....................................................82.3.3VHDL语言设计硬件电路的优点.......................................92.4QUARTUSII............................................................102.4.1QuartusⅡ简介...................................................102.4.2QuartusⅡ设计流程...............................................102.5实验箱简述..........................................................11第3章系统的设计.........................................................133.1总体设计............................................................133.1.1出租车计价器的设计要求..........................................133.1.2总体框架设计....................................................133.1.3流程图...........................................................143.2主要模块设计........................................................163.2.1出租车总体模块设计..............................................163.2.2车轮大小选择模块设计............................................173.2.3计程模块设计....................................................183.2.4计时模块设计....................................................183.2.5计费模块设计....................................................193.2.6数据分配模块设计................................................213.2.7译码模块设计....................................................213.2.8分频模块设计....................................................22第4章仿真及调试结果.....................................................234.1仿真结果............................................................234.1.1出租车总体模块仿真波形..........................................234.1.2车轮大小选择模块仿真波形........................................234.1.3计程模块仿真波形................................................244.1.4计时模块仿真波形................................................244.1.5计费模块仿真波形................................................254.1.6数据分配模块仿真波形............................................254.1.7译码模块仿真波形................................................264.1.8分频模块仿真波形................................................264.2管脚分配及说明......................................................274.3调试结果及分析......................................................27第5章总结...............................................................31致谢.....................................................................34参考文献.............................................................