Question: Please write a vhdl code, all necessary files, and top level entity, use all the original inputs and their symbols Technical Objective: A state machine
Please write a vhdl code, all necessary files, and top level entity, use all the original inputs and their symbols
Technical Objective:
A state machine is sequential circuit that stores the status of something at a given time and can operate on inputs to change the status andor cause an action or output to take place for any given change. In this lab, the design, coding and troubleshooting of a finite state machine will be investigated. To test the theory of designing with a state machine, a circuit to control the operations of a vending machine will be implemented.
Prelab :
Design a Vending machine controller that dispenses Red Bull drinks for $ The specifications are as follows.
The machine accepts dimes, nickels and quarters only. Only one coin can be input at a time.
If the dispense button is pushed before there has been $ input, it is ignored. If the button is pushed after $ has been deposited, the machine outputs the drink and any change, if applicable.
Once the total money in the machine reaches $ or more, any further deposits are immediately returned to the user.
If the coinreturn input is pressed at any time, all money is returned.
Two seven segment displays will always display the current balance in the machine.
The inputs and outputs are as follows:
Dime In Nickel in Quarter in: these indicate that money is being deposited. These should be connected to three slider switches on the DE board. Coin return: This input indicates that the user would like their money back. Connect it to a slider switch. Dispense: This input indicates that the user would like their drink. This should also be connected to a slider switch. Clk: Since the MHz clock on the DEO board is much too fast for this application, there are two choices. Connect clock to a pushbutton and manually clock the state machine Create a much slower clock in the design and clock the state machine at a sec rate. Resetn: this is the system reset and should be connected to Key Change back: this output indicates that change is being returned. It should be a red LED. Red Bull: This output indicates that the drink has been dispensed. It should be a red LED. HEX and HEX: These are two seven segment displays. They display the amount of money in the machine.
Design Suggestions
Make an individual process for each output. Do not assign the outputs in your nextstate logic process. The outputs must be a function of the state. You will need a separate process to keep track of the current money in the machine. This should be a clocked process since there is memory involved. Do not put this in the nextstate logic process either. Changes to the money variable are determined by the state as indicated in the table.
State Money RedBull Changeback wait money money dime money money nickel money money quarter money money enough money money excess money money vend money money change money
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
