EE3043 - C OMPUTER A RCHITECTURE
Milestone 1 — Design of a Vending Machine
Lecturer: PhD. Linh Tran
TA: Hai Cao
Department of Electronics
HCMC University of Technology, VNU-HCM
Abstract
This document presents the very first milestone in course EE3043, which re-
quires students to design a vending machine using SystemVerilog. Also, they must
understand and follow some specific coding guidelines and write reports. In case
you meet an error or have any improvement in this document, please email the TA:
cxhai.sdh221@hcmut.edu.vn with the subject
“[COMPARCH203: FEEDBACK]”
1 Objectives
• Review understanding of basic logic design and FSM
• Understand some coding guidelines
• Design a Vending Machine using SystemVerilog
2 Coding Guideline
While coding, you must remind yourself that you do NOT see your codes only once but
several times for several reasons, such as debugging or improving. A clean code file
will enormously save your valuable time. However, a “dirty code” file will pollute your
eyes and sabotage your head, or worse, make you wonder what have you done.
In this course, you could (or must) follow the coding guideline in this link.
3 Problem
Vending Machine is a dispenser machine that receives coins or bills and dispenses soft
drinks or snacks.
1
Figure 1: Vending machine’s ports
In this problem, you will design a vending machine that satisfies the requirements be-
low:
1. It accepts coins: ¢5 (Nickel), ¢10 (Dime), ¢25 (Quarter), but only one coin at a
time (or clock).
2. When the deposit exceeds ¢20, it dispenses a soda and a change.
3. Change is a 3-bit data
000 ¢0
001 ¢5
010 ¢10
011 ¢15
100 ¢20
In this example, if a customer put a dime and then a quarter, in the next cycle, he
received a soda and a change of ¢15.
Figure 2: Waveform of an example vending machine
Milestone 1 2
4 Report
Each group only submits one report. The report, however, must follow this template
and be composed in Google Docs.
Your report file’s name will be milestone1_student’s ID_student’s name.pdf
Milestone 1 3