Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you please draw a state diagram and an ASM chart for air hockey please. Here is the description below You will design an electronic

Can you please draw a state diagram and an ASM chart for air hockey please. Here is the description below You will design an electronic game of air-hockey that takes two players to play and
implement it on FPGA device. You will be asked to demonstrate your implementation on
FPGA device.
The playground is 2-dimensional 5x5 area. You will use LEDs (i.e. LD9 to LD5 from right to
left and left to right) and a seven segment display (SSD4) to simulate the moving puck in X
and Y axis, respectively, on FPGA. A puck moving from right to left is simulated as LEDs
illuminating one after another starting with LD9(i.e. LD9 illuminates the leftmost column,
then LD8, LD7, etc. It is basically a moving light). SSD5 will display the Y-coordinate of the
puck in decimal form.
Assume that we have two players: A standing on the left hand side and B on the right hand
side. The players will act using left and right buttons (BTNL and BTNR). Before the players
start playing, a player will take the first turn using his/her button. Then, the initial score will
be shown in the corresponding SSDs (SSD2-SSD0) as 0-0 for 1 second. Then, the score
will disappear. Assume that, player A takes the first turn. After the initial score was displayed,
LD15 will turn on to show an input is waited from the player A. Player A will give the Y-
coordinate and the direction which s/he wants to send the puck using his/her sliding switches
(SW15-SW13 for Y-coordinate and SW12-SW11 for the direction). Then, s/he will press
his/her button to send the puck and the puck will start moving. At the same time, LD15 will
turn off (because no input is waited from player A). The speed of the puck will be 1
second/step. After 4 seconds, the puck will arrive to the right-most column. When, the puck
arrives the right-most column, player B must hit the puck. In order to inform player B, when
an input is expected from him/her, LD0 will turn on. When (or before) the puck arrives to the
right-most column, player B must adjust the his/her SWs (SW2-SW0 for Y-coordinate and
SW4-SW4 for the direction according to the Y-coordinate of the puck and the direction that
s/he wants to send the puck. Then, s/he must push his/her button to hit the puck and the puck
will start going from right to left. When, s/he hits the puck, LD0 will turn off. Then, the same
procedure will be done by player A. And so on.
When a player cannot hit the puck in a second (either s/he does not press his/her button or Y-
coordinate is invalid), the other player will win the turn. In this case, the current score will be
displayed and LD9-LD5 will turn on for a second. Then, the player who lost the previous turn,
will start the next turn.
When a player scores 3 goals, s/he will win the game. In this case, the score (in score SSDs)
and the winner (Y-coordinate SSD) will be displayed. And LD9-LD5 will blink with 1 second
period.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

Identify the correct compound(s) in each case. Explain your choice.

Answered: 1 week ago

Question

What strategy for LMD is needed during a recession?

Answered: 1 week ago

Question

How can reflection for leaders and managers be implemented?

Answered: 1 week ago