【正文】
code0:process(item) 商品指示燈譯碼 梁正凱 基于 VHDL 的自動售貨機(jī)的設(shè)計與實現(xiàn) 第 13 頁 共 21 頁 13 begin case item is when 00=item0=0111。 then q:=q+1。 end if。 end if。coin=coin2。 elsif item=10 then act=0010。 對商品進(jìn)行循環(huán)選擇 elsif get=39。 elsif coin1=39。039。139。 architecture behav of PL_auto1 is type ram_type is array(3 downto 0)of std_logic_vector(7 downto 0)。 entity PL_auto1 is port ( clk:in std_logic。 ③ 物品模塊:記錄物品的種類、對應(yīng)的單價、以及其數(shù)量 ④ 信號模塊:系統(tǒng)對系統(tǒng)時鐘,用戶的買、選擇、完成信號,顯示 開關(guān)信號等信號的設(shè)置。 隨著科技的發(fā)展及人們生活水平的提高,自動售貨機(jī)市場的發(fā)展越來越呈現(xiàn)出多元化及個性化的需求。 關(guān)鍵詞 : VHDL、自動售貨機(jī) 、 課程設(shè)計、 MXAPLUSⅡ 、 系統(tǒng) 仿真 梁正凱 基于 VHDL 的自動售貨機(jī)的設(shè)計與實現(xiàn) 第 5 頁 共 21 頁 5 Abstract: This design use of VHDL language design a vending machine control system, the system have the functions to storage the goods information, process control, coin handling, balance calculation, display and other functions. The type of goods, unit price and quantity in the initialization to be input, and then stored. Currency for the coins can be identified, fifty cents and one dollar denomination. User input coins, the system account sum, and then paring the unit price and quantity of goods, price, the final calculation of the balance, you can give change. Design did not consider the hardware implementation, only the corresponding functional simulation, experimental nature of the curriculum design. Keywords: VHDL, vending machines, curriculum design, MXAPLUS Ⅱ , system simulation 梁正凱 基于 VHDL 的自動售貨機(jī)的設(shè)計與實現(xiàn) 第 6 頁 共 21 頁 6 目錄 1. 引言 …………………………………………………………… ..7 自動售貨機(jī)系統(tǒng)概述 …………………………………… 7 設(shè)計任務(wù)和主要內(nèi)容 …………………………………… 8 2. 系統(tǒng)設(shè)計過程 ………………………………………………… ..9 自動售貨機(jī)系統(tǒng)總體框圖 ……………………………… 9 系統(tǒng)功能 模塊 …………………………………………… 9 程序源代碼 ……………………………………………… 11 3. 系統(tǒng)仿真 ……………………………………………………… ..15 系統(tǒng)仿真全圖 …………………………………………… 15 系統(tǒng)分步 仿真 圖 ……………………………………… ... 16 4. 總結(jié) …………………………………………………………… ..20 參考文獻(xiàn) ………………………………………………………… .. 21 梁正凱 基于 VHDL 的自動售貨機(jī)的設(shè)計與實現(xiàn) 第 7 頁 共 21 頁 7