Design a state machine that will control a vending machine


Question - 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.

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.

Request for Solution File

Ask an Expert for Answer!!
Theory of Computation: Design a state machine that will control a vending machine
Reference No:- TGS02928201

Expected delivery within 24 Hours