【正文】
s bounce. Inside the covering or casing, a rubber bladder holds air. The ball must be inflated to a pressure sufficient to make it rebound to a height (measured to the top of the ball) of 4954 in ( m) when it is dropped on a solid wooden floor from a starting height of 6 ft ( m) measured from the bottom of the ball. The factory must test the balls, and the air pressure that makes the ball legal in keeping with the bounce test is stamped on the ball. During the intensity of high school and college tourneys and the professional playoffs, this inflated sphere mands considerable attention. Basketball is one of few sports with a known date of birth. On December 1, 1891, in Springfield, Massachusetts, James Naismith hung two halfbushel peach baskets at the opposite ends of a gymnasium and outlined 13 rules based on five principles to his students at the International Training School of the Young Men39。 大學生活即將結束,我也即將步入社會這個人生大舞臺,要學習的東西還有很多。由于經(jīng)驗不足和時間原因,本文中對該自動售貨機系統(tǒng)的設計也存在了一些不足之處。 設計思想及工作原理 由 QuqrtusⅡ軟件內(nèi)部生成的 RTL 電路圖如圖所示: 自動售貨機控制系統(tǒng)的設計與仿真 25 仿真測試 對整個系統(tǒng)進行功能仿真測試,對仿真的結果的其中一部分進行分析,對以下兩種仿真情況進行分析: 確認購買但余額不足 確認購買且需要找零 對第 1 種情況進行仿真得到如圖的仿真圖: 在該波形圖中可以看出, 在 5ns 的時候,系統(tǒng)復位;在時間為 30ns 的時候,系統(tǒng)收到一個 1 元貨幣投入信號和一個 5 元貨幣投入信號,緊接著在 50ns 的時候又收到一個一元貨幣投入信號;兩個顯示器顯示了投入貨幣的總額;在時間為 80ns 的時 自動售貨機控制系統(tǒng)的設計與仿真 26 候,系統(tǒng)收到確認信號 ok_in,投幣結束,開始執(zhí)行找零或者退幣操作;系統(tǒng)內(nèi)部通過判斷發(fā)現(xiàn)所投入貨幣總額小于商品價格,所以開始進行全額退幣過程;在 90ns的時候系統(tǒng)發(fā)出同時退出一元貨幣和五元貨幣的信號 RC1 和 RC5。 Lock 模塊的端口原理圖如圖所示: 自動售貨機控制系統(tǒng)的設計與仿真 23 由 QuqrtusⅡ軟件內(nèi)部生成的 TRL 電路圖如 圖所示: 七段數(shù)碼管顯示器設計 在元件 disp7 程序設計中,有一個輸入端口 din,一個輸出端口 led。 ( lock 模塊) 設計思想及工作原理 鎖定模塊有以下輸入輸出端口: ? 輸入端口: rst,復位信號; clear,清除信號; ok,確認購買信號; cancel,取消購買信號。 由 QuqrtusⅡ軟件內(nèi)部生成的 RTL 電路圖如圖所示: 自動售貨機控制系統(tǒng)的設計與仿真 18 仿真測試 對總額加和模塊進行仿真測試得到如圖所示的波形圖: 對圖中波形進行分析可以發(fā)現(xiàn),在 5ns 之前,系統(tǒng)在復位狀態(tài);在時間為 20ns 的時候,系統(tǒng)接收到 C C C10 發(fā)出的 3 個投幣信號, 30ns 時又收到 1 個 1 元投幣信號,對應的 sum sum sum10 記錄了相對應不貨幣的數(shù)量, sum 則記錄了投入貨幣的總額;在時間為 40ns 時, lock_out_entry 信號變?yōu)楦唠娖剑藭r其他按鍵都會無效;當系統(tǒng)開始接收到退幣信號后,相應的 sum sum sum10 也會發(fā)生 變化,找零結束后系統(tǒng)發(fā)出清零信號,系統(tǒng)內(nèi)的表示和內(nèi)部信號都被清除。 ( refund 模塊) 自動售貨機控制系統(tǒng)的設計與仿真 14 設計思想及工作原理 找零控制模塊有以下輸入端口: ? 輸入端口: clk,輸入時鐘信號; rst,復位信號; clear,清除信號; ok,接收到確認信號; cancel,接收到取消信號; sum1,表示接收到的投入 1 元貨幣的信號;sum_5,接收到的投入 5 元貨幣的信號; sum10,表示接收到的投入 10 元貨幣的信號 ; sum,投入貨幣總和信號; Rsum1,退出 1 元貨幣的數(shù)量; Rsum5,退出 5 元貨幣的數(shù)量; Rsum10,退出 10 元貨幣的數(shù)量; ? 輸出端口: en_deliver,給貨控制信號; RC1,退幣 1 元的信號; RC5,退幣 5 元的信號; RC10,退幣 10 元的信號。 自動售貨機控制系統(tǒng)的設計與仿真 12 4 軟件設計及仿真測試 ( ok_cancel 模塊) 設計思想及工作原理 在確認取消模塊中,顧客可以在投幣之后選擇繼續(xù)購買商品或者取消購買商品,若確定購買則會產(chǎn)生一個確認信號,而該模塊可以把該信號轉換成單時鐘的控制信號, 同時確定購買 led_buy 顯示燈會亮;同樣,若顧客按下取消健,則該模塊會將輸入的取消信號轉換單時鐘周期的控制信號,同時確定購買 cancel_buy 顯示燈會變亮。各模塊的功能: 余額計算模塊: 當顧客確認購買商品并按下了售貨機的確認鍵后,找零模塊就開始計算出應該退還的余額。所投入的貨幣總額會實時計算并通過顯示器顯示出來。由于系統(tǒng)設計從頂層開始,所以在進行設計時就清楚實現(xiàn)整個系統(tǒng)的性能狀況。 ? 具有很 具有全面的可設計開發(fā)資源,是一個集 系統(tǒng)設計、軟件開發(fā)、邏輯設計于一體的綜合性開發(fā)平臺。 ? 具有很強的移植能力,對于同一個 VHDL 程序,它可以在不同的工作平臺、綜合器、模擬器之間相互移植。( EDA 技術與 VHDL P1) VHDL VHDL 的全稱是 Very High Speed Circuit Language,與另一種 VerilogHDL 語言是現(xiàn)在電子設計自動化中用的最多的兩種硬件描述語言 ,現(xiàn)在用的比較多的 EDA 工具基本都支持這兩種語言,在電子領域中已經(jīng)成為了通用的硬件描述語言。 EDA 技術有著豐富的內(nèi)容,與電子技術很多領域有著密不可分的聯(lián)系,所以其發(fā)展同計算機輔助工程、電子設計技術以及集成電路的大規(guī)模設計技術等都是同步發(fā)展的。 課題研究的主要內(nèi)容 本文主要研究利用自動售貨機來完成商品處理、貨幣找零、出貨操作、 led 顯示等功能。在 2021 六月份,我國各式各類的自動售貨機的總量只有三萬臺,而在 2021 六月份,該數(shù)量已經(jīng)上升至五萬臺,增長幅度高達差不多 50%,當然由自動售貨機帶來的營業(yè)額也是非常龐大的。快捷自動化的生活方式正是快節(jié)奏生活下人們所追求的一種高品質的生活方式。 pursuit of high quality life, under this kind of phenomenon, a number of automation equipment should e into being. Vending machine as one of the most mon equipment in the automation equipment, has been develop all over the world and develop constantly because it has many advantages .Vending machines set off after department stores and supermarkets in another retail frenzy, this intelligent vending system has broad prospects for development in the station, school buildings, office buildings and other public places. Based on the background of the vending machine, the article designs and plans the project of vending machine system after introducing the history and development vending machine control system is based on the EDA technology to realize, at the same time, it used Quarter Ⅱ of the Altera corporation as the software development platform, taking advantage of VHDL programming language input pleted the software design. The design scheme is hierarchical write for the whole hierarchical control whole system is divided into six sub modules, change calculation module, confirming cancellation control module, the change control module, total amount module, display module, locking module, and each child module software design is design in the top floor file by calling each module to plete the VHDL program design. Finally, The design scheme pleted the function simulation test to verify for each child modules, and conducts Toplevel design and simulation test for the whole system, the test results show the rationality and validity of the whole control system. The design of the whole control system is simple and reasonable, the operation is simple, it meets the basic requirement of the vending machine and has certain practical significance. keywords :The vending machine、 EDA、 VHDL、 QuqrtusⅡ 自動售貨機控制系統(tǒng)的設計與仿真 3 1 緒論 課題研究背景 早在 20世紀 30年代,出售香煙的自動售貨機就在美國被研制出來了,此后,各類自動售貨機也相繼被研究出來。 本文在對自動售貨機的背景歷史和發(fā)展趨勢進行了研究介紹之后,對課題中的自動售貨機系統(tǒng)進行 了整體的設計及規(guī)劃。該自動售貨機控制系統(tǒng)是基于 EDA技術來實現(xiàn)的,同時,利用 Altera 公司的 QuartusⅡ 作為其軟件開發(fā)平臺,利用 VHDL 編程語言輸入的方式完成了軟件設計。到了 20世紀的 70年代,自動售貨機在歐美地區(qū)和日本的發(fā)展已經(jīng)相當?shù)钠毡?。而自動售貨機作為商業(yè)自動化的一種常見設備,無論是在國內(nèi)還是國外,都深受消費者的喜愛,時代的發(fā)展為自動售貨機提供了良好的發(fā)展條件。隨著科技的不斷發(fā)展,如今的自動售貨機也越來越先進,其中設備的科技含量也日漸增高 。完成的工作主要包括以下幾個方面: 。就近 30 多年來其發(fā)展可分為以下階段: ? 上世紀 70