Professional Documents
Culture Documents
ERS220 Lab3 Guideline 2023
ERS220 Lab3 Guideline 2023
ERS220 Lab3 Guideline 2023
Ping-Pong Game
1. Introduction
This assignment is completed in a group of 3 to 4 persons – remember that smaller groups require
explicit permission to do so. In this laboratory exercise a ping-pong game will be designed using a
finite state machine (FSM) and a controller hardware architecture. The game must be implemented
and demonstrated with a discrete circuit and on the DE0 FPGA board. Figure 1 illustrates what the
game setup should look like.
The game setup has 8 LEDs flashing in sequence, emulating the movement of a ping-pong ball. The
purpose of the game is to bounce the ball back by pressing a return button when the ball has reached
the last LED in the sequence.
In the basic game, the default start is an automatic serve at the right with the ball moving left from
RLAMP to LLAMP. When the ball reaches LLAMP, a press and hold of the LPB button will hold
the ball at LLAMP till it is bounced back by releasing LPB. The ball will then move from LLAMP
to RLAMP and must be returned by using button RPB, with the same requirements as for LPB.
The game ends when a ball is missed. The ball is missed by pressing the LPB button when the LLAMP
is not lit. Similarly, the ball is missed when RPB is pressed when RLAMP is not lit. A new game
starts with the ball starting from RLAMP in another automatic serve.
2. Assignment
This is a group assignment. Your Lab2 group may continue to work together, but it is allowed that
groups are reconstituted. The Lab 2 groups are copied to the Lab 3 demonstration assessment on the
JAMS, but self-enrolment is open. Partition the work in such a way that all demonstrations can be
accomplished.
1
2.1. Fallback game
• The fallback assignment is a simplified unidirectional version of the basic ping-pong game.
There is only one return button, LPB. After a successful bounce from LPB, the ball moves
from LLAMP to RLAMP and the game ends.
3. Technical description
The partial state diagram in Figure 2 may be modified to suit the game. The diagram is not complete
and is intended as a starting point only.
4. Deliverables
4.1. Functioning discrete circuit
The ping-pong game must be designed and built using the prescribed SSI chips. The technical
arrangements are also similar to those of Lab2.
3
4.5. Reporting
Individual lab books must be submitted to the JAMS on the day of the demonstration evaluation
session. The format must follow the EECE and ERS220 guidelines for lab books, but ensure that you
explicitly address the following topics (indicated with clear headings):
• Introduction
• Design outputs
− Clock frequency
− Detailed state diagram
− State encoding
− Complete discrete (hierarchical) circuit diagram
− Complete VHDL block diagram (and upload code and Quartus files)
• Hardware physical setup hierarchy - drawn diagram(s) or photograph(s)
• Conclusions
• References
5. Demonstration
The functional discrete circuit, as well as the FPGA implementation, must be demonstrated at the
practical demo session. It is compulsory to use the bench power supply for the demonstration of your
discrete circuit. The scheduled day for the evaluation of Lab 3 demonstrations can be found in the
module calendar. Your group will be assigned a demonstration time slot and a lab bench. The
schedule will be made available one day ahead of the demo date. Please be ready to demo 15 minutes
prior to your time slot.