Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions

Question

Explain the three types of management compensation.

Answered: 1 week ago