DSD Cep Report
DSD Cep Report
1
Vending Machine (FSM)
Objective
a) Design of a Finite State Machine to perform the task of a vending machine
b) Develop the synthesizable HDL code
c) Analyze the synthesized circuit in simulator
d) Implementation on FPGA
Introduction
A supermarket vending machine's design entails developing a system that can distribute desired
goods, provide cash receipts, and refund any leftover change. The goal of this project is to use a
Xilinx Field Programmable Gate Array (FPGA) to create such a vending machine. FPGA technology
has a number of benefits, including speed, versatility, and the capacity to effectively execute intricate
logic operations. We can create a durable, dependable, and scalable vending machine system that
satisfies the requirements of contemporary supermarkets by utilizing the programmable
characteristics of the FPGA.
We will cover every step of the process in this project, from initial simulation and design to hardware
implementation and Xilinx FPGA testing. Establishing the system architecture, creating the control
logic, integrating with peripherals (such product dispensers and receipt printers), and guaranteeing
precise financial transactions are important phases. Our goal in undertaking this project is to
demonstrate how FPGA technology may be used to develop dependable and effective vending
machine systems for use in grocery stores.
Methodology
For implementing a Vending Machine we have to consider following steps which provide detail
methodology and understanding of designing a basic vending machine and implementing it on
FPGA:
1. Firstly consider a state diagram for a vending machine with every possible states. Such a state
diagram is shown in Figure 1.
2
Figure 1: Vending Machine state diagram.
The vending machine give an output only when input becomes 15 rupees other than that it either
change states or return back the change.
2. Open Xilinx ISE make a new project name “Vending_Machine” select the parameters as
shown in Figure 2.
3. Create a new Verilog module and write the Verilog code in it as shown in Figure 3.
3
Figure 3: Creating Verilog module.
4. After writing the code write its user constraints file by adding a new source and selecting
“Implementation constraints file”, write the user constraints over there, as shown in.
5. Create a new Test bench module for testing and simulating the code as shown in Figure 5
4
Figure 6: Check these parameters before Programing FPGA.
7. Now Add new Xilinx device and program it accordingly, as shown in Figure 7:
8. Now check the performance of the code through FPGA, and record the results.
5
Synthesizable HDL code:
6
Simulated Results:
FPGA implementation:
7
Figure 11: At input of 0 Rs.
8
Figure 14: At any other input.
Conclusion:
The vending machine, which was implemented with the help of a Xilinx FPGA, has
effectively illustrated the potential of FPGA technology in creating scalable, dependable, and effective
systems for supermarket situations. Our project included every step of the process, from hardware
implementation and testing to design and simulation, guaranteeing accurate financial transactions and
seamless connectivity with peripheral devices. In addition to accomplishing the set goals, the built system
demonstrates the flexibility and resilience of FPGAs in managing intricate logic operations, improving the
general functionality and user experience of grocery vending machines.
9
10