DSD Cep Reeport
DSD Cep Reeport
1
Mustabshira Younas (1012)
Noor ul Islam (1007)
Contents
Project Description................................................................................................................................................3
Background.......................................................................................................................................................3
Purpose..............................................................................................................................................................3
Procedure and Discussion.....................................................................................................................................4
Project plan...........................................................................................................................................................8
Project Distribution...............................................................................................................................................9
References:......................................................................................................................................................10
2
Abstract
This lab report details the design and implementation of a vending
machine for a supermarket, capable of accepting cash, dispensing
products, and returning the remaining amount. The vending machine is
implemented on a Xilinx FPGA, utilizing hardware description language
(HDL) for design. The system ensures accurate cash handling, product
dispensing, and change return. This project showcases the practical
application of digital logic design and FPGA programming in real-world
scenarios.
Objective
The primary objective of this lab is to design a functional vending machine capable of:
Equipment Used
Xilinx FPGA development board (e.g., Xilinx Spartan)
Xilinx ISE Design Suite
VHDL/Verilog for hardware description
Introduction
Vending machines have become an integral part of modern retail environments,
providing a convenient and automated way for customers to purchase products
3
without the need for human interaction. These machines can be found in a variety of
settings, from supermarkets and shopping malls to offices and public transportation
hubs. The fundamental operation of a vending machine involves accepting payments,
dispensing selected products, and returning any excess amount to the customer. The
automation of these processes requires careful consideration of both hardware and
software components to ensure reliability, accuracy, and user satisfaction.
In this project, we aim to design and implement a vending machine for a supermarket
that not only accepts cash payments but also provides a receipt of the transaction and
returns any remaining amount to the customer. The vending machine will be
implemented on a Xilinx FPGA, leveraging the advantages of FPGA technology such
as reconfigurability, parallel processing, and high-speed operation.
Methodology
1. System Design
The vending machine system is designed to perform the following operations:
4
LEDs for outputs).
4. FPGA Implementation
The HDL code is synthesized and implemented on a Xilinx FPGA using the Xilinx
ISE Design Suite. The design is then tested and verified on the FPGA development
board.
5. Testing
Extensive testing is conducted to ensure the vending machine operates as expected.
This includes testing various cash inputs, product selections, and ensuring accurate
change return.
2. FPGA Implementation
The design is successfully implemented on the Xilinx FPGA. The vending machine
accepts cash inputs through switches, allows product selection, and indicates the
dispensed product and remaining amount through LEDs. The system performs
accurately, handling various cash inputs and product selections as expected.
3. Performance Analysis
The FPGA implementation demonstrates efficient performance, with quick response
times for cash input, product dispensing, and change return. The use of an FPGA
allows for a flexible and reconfigurable design, enabling easy modifications and
upgrades.
5
Debouncing Switch Inputs: Switch inputs required debouncing to prevent multiple
readings. A debouncing circuit was implemented in HDL to address this issue.
Accurate Change Calculation: Ensuring accurate calculation and return of change was
critical. This was handled by precise state transitions and arithmetic operations in the
HDL code.
6
7
8
Verilog Test Bench Code:
9
10
11
Waveform:
Figure 1Waveform
12
Figure 2 FPGA BOARD SPARTAN
13
Conclusion:
The design and implementation of a vending machine on a Xilinx
FPGA demonstrate the practical application of digital logic and
hardware description languages. The system successfully performs
cash handling, product dispensing, and change return, providing a
robust solution for automated vending. The use of FPGA technology
allows for rapid prototyping and efficient performance, making it a
suitable platform for such applications. Future improvements can
include adding support for multiple payment methods and
enhancing user interface elements.
14