Question: 1. Design a state machine that will control a vending machine. The vending machine has 4 inputs, N, D indicating a nickel or dime was

 1. Design a state machine that will control a vending machine.

1. Design a state machine that will control a vending machine. The vending machine has 4 inputs, N, D indicating a nickel or dime was inserted as well as clk and an active high asynchronous reset. The vending machine should assert output OK if the amount inserted equals $0.25. The machine does not give change. Inputs N and D cannot simultaneously assert. Amounts inserted over $0.25 will be retained for the next product. For example, if input D asserts twice (indicating 2 dimes were inserted) and then input D asserts (indicating another dime was inserted) output OK will assert and then only $0.20 will need to be inserted for output OK to assert again. (40 pts) Requirements: a. Draw the state transition graph b. Implement in Verilog the module describing the state machine c. Use parameters to encode the state of your state machine d. Turn in your module and testbench code as well as a simulation waveform 1. Design a state machine that will control a vending machine. The vending machine has 4 inputs, N, D indicating a nickel or dime was inserted as well as clk and an active high asynchronous reset. The vending machine should assert output OK if the amount inserted equals $0.25. The machine does not give change. Inputs N and D cannot simultaneously assert. Amounts inserted over $0.25 will be retained for the next product. For example, if input D asserts twice (indicating 2 dimes were inserted) and then input D asserts (indicating another dime was inserted) output OK will assert and then only $0.20 will need to be inserted for output OK to assert again. (40 pts) Requirements: a. Draw the state transition graph b. Implement in Verilog the module describing the state machine c. Use parameters to encode the state of your state machine d. Turn in your module and testbench code as well as a simulation waveform

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!