Question: A state machine is required for a simple vending machine. The machine takes one dollar coins only. Each time a coin is added the input

 A state machine is required for a simple vending machine. Themachine takes one dollar coins only. Each time a coin is added

A state machine is required for a simple vending machine. The machine takes one dollar coins only. Each time a coin is added the input signal "coin" is set to 1 for one clock cycle. When a total of exist4 has been added the output signal "deliver" is set to 1 for one clock cycle and the state machine starts counting coins for the next delivery. a) Draw a state diagram for this state machine. Make sure you label each state with a state name and the value of the "deliver" output. Also make sure you label each transition with the value of the "coin" input. Please use "VM0", "VM1", "VM2"... for the state names. b) For an ASIC implementation of the vending machine, a binary state encoding is the best choice. i) Perform a binary state assignment. Please use "s0", "s1", ... for the binary state bit names. ii) Using this state assignment, draw a state table showing next state as a function of current state and the "coin" input. Use "next_s0", "next_s1", ... for the binary next state bit names. Using the state table, derive (unoptimised) equations for the next state bits. iii) Using this state assignment, draw an output table showing the outputs as a function of current state and the "coin" input. Using the output table, derive an (unoptimised) equation tor the "deliver" output. c) For an FPGA implementation of the vending machine, a one-hot (or modified one-hot) state encoding is the best choice. i) Perform a one-hot (or modified one-hot) state assignment. Please use "vm0", "vm1", ... for the state signal names. ii) Using this state assignment, draw a state table showing next state as a function of current state and the "coin" input. Use "next_vm0", "next_vm1", ... for the next state signal names. Using the state table, derive next (unoptimised) equations for the next state signals. Using this state assignment, draw an output table showing the outputs as a function of current state and the "coin" input. Using the output table, derive an (unoptimised) equation for the "deliver" output

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!