0% found this document useful (0 votes)
11 views10 pages

DSD Cep Report

This document details the design and implementation of a finite state machine for a vending machine using an FPGA. It describes the methodology which includes developing a state diagram, writing Verilog code, simulation, and testing on an FPGA board. Results show the vending machine operating correctly through different states based on monetary inputs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views10 pages

DSD Cep Report

This document details the design and implementation of a finite state machine for a vending machine using an FPGA. It describes the methodology which includes developing a state diagram, writing Verilog code, simulation, and testing on an FPGA board. Results show the vending machine operating correctly through different states based on monetary inputs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Department of Electronic Engineering Faculty

of Engineering and Technology


The Islamia University of Bahawalpur

Digital System Design (DSD)


Complex Engineering Problem (Report)
Course Instructor:
Dr. Abid Munir
Date:
27th May 2024
Submitted by:
 S M Abduz Zahra Naqvi (36)
 Muhammad Junaid (28)

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.

Figure 2: Setting Parameters.

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.

Figure 4: Creating User constraints file.

5. Create a new Test bench module for testing and simulating the code as shown in Figure 5

Figure 5: Creating test bench.

6. Now check all the states as shown in Figure 6:

4
Figure 6: Check these parameters before Programing FPGA.

7. Now Add new Xilinx device and program it accordingly, as shown in Figure 7:

Figure 7: Add new Xilinx device here.

8. Now check the performance of the code through FPGA, and record the results.

Results and Discussion


State Diagram:

5
Synthesizable HDL code:

Figure 8: HDL code for vending Machine.

6
Simulated Results:

Figure 9: Test Bench Code.

Figure 10: Simulation Results.

FPGA implementation:

7
Figure 11: At input of 0 Rs.

Figure 12: At input of Rs 5.

Figure 13: At input of Rs10 after adding two time Rs 5.

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

You might also like