A vending machine is an automated machine that provides items such as snacks and beverages to the consumers after the cash is inserted to the machine. For example, a vending machine to dispense candies where the vending machine accepts 10 cent and 20 cent coins only. The price of the candy is 30 cents. Therefore, the machine will automatically dispense the candy whenever it has received 30 cents. If it receives more that 30 cents, it will dispense the candy with the balance money. In this assignment, you are required to propose and design a vending machine controller for the above specifications. Assume that there are two outputs for the vending machine controller, which are F and G. F = 1 and G = 0 indicate 30 cents have been received and there is no balance money. F = 1 and G = 1 indicate the machine received more that 30 cents and need to return the balance money. need to do Verilog program and tech bench and the rsuilt
Control structures
Control structures are block of statements that analyze the value of variables and determine the flow of execution based on those values. When a program is running, the CPU executes the code line by line. After sometime, the program reaches the point where it has to make a decision on whether it has to go to another part of the code or repeat execution of certain part of the code. These results affect the flow of the program's code and these are called control structures.
Switch Statement
The switch statement is a key feature that is used by the programmers a lot in the world of programming and coding, as well as in information technology in general. The switch statement is a selection control mechanism that allows the variable value to change the order of the individual statements in the software execution via search.
A vending machine is an automated machine that provides items such as snacks and beverages
to the consumers after the cash is inserted to the machine. For example, a vending machine to
dispense candies where the vending machine accepts 10 cent and 20 cent coins only. The price
of the candy is 30 cents. Therefore, the machine will automatically dispense the candy
whenever it has received 30 cents. If it receives more that 30 cents, it will dispense the candy
with the balance money. In this assignment, you are required to propose and design a vending
machine controller for the above specifications. Assume that there are two outputs for the
vending machine controller, which are F and G. F = 1 and G = 0 indicate 30 cents have been
received and there is no balance money. F = 1 and G = 1 indicate the machine received more
that 30 cents and need to return the balance money.
need to do Verilog program and tech
bench and the rsuilt
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 5 images