sduwh-EDA electronic design automation experiment-Lab Exercise 6 vending machine (optional)

This column contains all the experiments of sduwh's eda course, for reference only

To design a vending machine circuit, it is required to be able to sell more than two kinds of commodities, and to receive and recognize currencies with more than two denominations. Commodities and prices are self-determined, and the functions of sending commodities and changing money can be realized.

Please complete the Verilog code, timing simulation, hardware test, and submit an experiment report.

experimental report:

Electronic Design Automation - There are 4 kinds of commodities in the vending machine, which are 0.5 yuan, 1 yuan, 1.5 yuan, and 2 yuan. There are two currencies, 0.5 yuan and 1 yuan. However, it is difficult for Verilog to represent decimals. Expand to twice the actual value so that there is no decimal, and the final output still corresponds to 0.5, 1, 1.5, and 2 yuan.

code:

Guess you like

Origin blog.csdn.net/qq_22471349/article/details/129213318