【正文】
基于 FPGA 的出租車計價器的設計 摘 要 出租車計價器是乘客與司機雙方的交易準則。具有良好性能的計價器無論是對廣大出租車司機朋友還是乘客來說都是很必要的。現(xiàn)在各大中城市出租車行業(yè)都已普及自動計價器,而部分小城市尚未普及,但隨著城市建設日益加快,象征著城市面貌的出租車行業(yè)也將加速發(fā)展,所以計價器的普及也是毫無疑問的。 本論文闡述了 EDA 的發(fā)展及其 優(yōu)勢 、 FPGA 的 發(fā)展趨勢 及 結構特點和 VHDL 語言的優(yōu)點及語法結構,并分析了出租車計價器 各 模塊的功能要求、基本原理 以及 實現(xiàn)方法 。 本論文 的 設計 采用 VHDL 硬件描述語 言進行編程, 基于 Quartus II 軟件平臺進行編譯和仿真。論文 介紹了采用 FPGA 芯片設計出租車計價器的方法,闡述了該計價器的主要組成單元:車輪大小選擇模塊、計程模塊、計時模塊及計費模塊、數(shù)據(jù)分配模塊、分頻模塊、譯碼模塊的設計方法,同時給出了詳細的仿真波形,實現(xiàn)了出租車基本計費功能,還能模擬汽車啟動,停止,暫停等狀態(tài),同時提高了計費系統(tǒng)的可靠性、通用性。本設計在 FPGA試驗箱上運行良好,實現(xiàn)了計費器的各項功能。 關鍵字 FPGA, VHDL, Quartus II, 出租車計價器 Subject: The design of the taxi meter based on FPGA Specialty: Microeletronics Science and Engineering Name:Dan Shen (Signature) ___________ Instructor: Gaili Yue (Signature) ___________ ABSTRACT Taxi meter is the rule of passenger and driver. Have a good performance of the meter for our taxi driver or passenger is very necessary. Now the automatic taxi meter has popularized, and some small city has not been popular, but with the quickening of city construction, the symbol of the city will accelerate development of the taxi industry. This article elaborates the concept and development of EDA , the development trend and structure of the FPGA, andexplains the advantages and grammar structure of VHDL ,meanwhile, analysed the function request, the basic principle as well as the method ofacplishment of each parts. This system39。s design programmes in the VHDL, piled and emulated basing on Quartus II platform of Altera consists of four modules, that is speed, mileage, timing and billing module. This paper introduce one method that can use a chip of FPGA to design taxi meter, which consists of four modules, that is speed, mileage, timing and billing module, and then, describe the design of each module and give out the simulation. This taxi meter can be selfcharging according to mileage, which also can simulate the state of speed,such as start, stop, and pause, at the same time, its reliability and monality also can be improved. This design FPGA test box on running well, realize the different functions of the message accounting device. KEY WORDS FPGA , VHDL , Quartus II ,The taxi meter 1 目 錄 第 1 章 緒論 ................................................................ 1 課題研究背 景及目的 ................................................... 1 課題研究現(xiàn)狀 ......................................................... 2 課題研究方法 ......................................................... 3 第 2 章 設計相關工具介紹 .................................................... 4 EDA 介紹 .............................................................. 4 EDA 的發(fā)展 ........................................................ 4 EDA 的優(yōu)勢 ........................................................ 5 FPGA 介紹 ............................................................. 5 FPGA 的發(fā)展趨勢 ................................................... 6 FPGA 結構及其特點 ................................................. 7 VHDL 介紹 ............................................................. 7 VHDL 簡介 ......................................................... 7 VHDL 代碼結構 ..................................................... 8 VHDL 語言設計硬件電路的優(yōu)點 ....................................... 9 QUARTUS II ............................................................ 10 QuartusⅡ簡介 ................................................... 10 QuartusⅡ設計流程 ............................................... 10 實驗箱簡述 .......................................................... 11 第 3 章 系統(tǒng)的設計 ......................................................... 13 總體設計 ............................................................ 13 出租車計價器的設計要求 .......................................... 13 總體框架設計 .................................................... 13 流程圖 ........................................................... 14 主要模塊設計 ........................................................ 16 出租車總體模塊設計 .............................................. 16 車輪大小選擇模塊設計 ............................................ 17 計程模塊設計 .................................................... 18 計時模塊設計 .................................................... 18 計費模塊設計 .................................................... 19 數(shù)據(jù)分配模塊設計 ................................................ 21 譯碼模塊設計 .................................................... 21 分頻模塊設計 .................................................... 22 2 第 4 章 仿真及調試結果 ..................................................... 23 仿真結果 ............................................................ 23 出租車總體模塊仿真波形 .......................................... 23 車輪大小選擇模塊仿真波形 ........................................ 23 計程 模塊仿真波形 ................................................ 24 計時模塊仿真波形 ................................................ 24 計費模塊仿真波形 ................................................ 25 數(shù)據(jù)分配模塊仿真波形 ............................................ 25 譯碼模塊仿真波形 ................................................ 26 分頻模塊仿真波形 ................................................ 26 管腳分配及說明 ...................................................... 27 調試結果及分析 ...................................................... 27 第 5 章 總結 ............................................................... 31 致 謝 ..................................................................... 34 參考文獻 .................................................................. 35 附 錄 ..................................................................... 36 源代碼 .................................................................. 36 1 第 1 章 緒論 課題研究背景及目的 出租車計價器是乘客與司機之間用于公平貿易的工具,同時它也是出租車行業(yè)發(fā)展的重要標志。所以具有良好性能的出租車計價 器無論是對司機還是乘客來說都是很重要的。因此,設計出租車計價器是 很有 價值的。 在 70 年代開始時 我國